You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’d like to propose adding native support for parameterized tests in Cypress. This feature would allow us to run the same test logic with multiple sets of inputs and expected results, similar to parameterization features in frameworks like Pytest.
Problem
Currently, implementing parameterized tests requires custom loops or workarounds, which can make test code less readable and more verbose. Native support would simplify the process and improve readability, allowing for a more streamlined and expressive testing experience.
Proposed Solution
Adding a built-in cy.parametrize (or similar) function could:
Enable defining multiple test cases within a single test.
Simplify writing and maintaining tests with various data sets.
Enhance test organization by reducing duplicated code.
Benefits
Improves Readability: By reducing boilerplate code and making it easier to understand test cases at a glance.
Enhances Maintainability: Allows adding new scenarios with minimal changes to the test structure.
Aligns with Testing Practices: Brings Cypress in line with parameterization features found in other testing frameworks, which many developers are already familiar with.
I believe this feature would be a valuable addition to Cypress, and I’m curious to hear the community’s thoughts. Thanks for considering this idea!
The text was updated successfully, but these errors were encountered:
This repo is probably not the right place for your suggestion, since this repo is only concerned with running Cypress under GitHub Actions. https://github.com/cypress-io/cypress is the main repository.
You can connect to the Cypress technical community on Discord
I’m familiar with using cy.fixture() for loading external data, but I believe that native support for parameterization would be a powerful addition to the Cypress ecosystem. The idea is to enable running the same test logic with different sets of inputs and expected results, similar to what’s available in Pytest.
This feature would not only simplify test readability and maintainability but also align Cypress with widely used testing practices, making it easier for more developers to fully leverage the platform. I’ll follow your advice and propose this idea in the main Cypress repository and also bring it up on Discord.
Hello Cypress team and community!
I’d like to propose adding native support for parameterized tests in Cypress. This feature would allow us to run the same test logic with multiple sets of inputs and expected results, similar to parameterization features in frameworks like Pytest.
Problem
Currently, implementing parameterized tests requires custom loops or workarounds, which can make test code less readable and more verbose. Native support would simplify the process and improve readability, allowing for a more streamlined and expressive testing experience.
Proposed Solution
Adding a built-in
cy.parametrize
(or similar) function could:Benefits
I believe this feature would be a valuable addition to Cypress, and I’m curious to hear the community’s thoughts. Thanks for considering this idea!
The text was updated successfully, but these errors were encountered: