Continuous Test Orchestration And Execution Platform Online

Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.

How to maintain and update test cases in Cypress?

Cypress is a JavaScript based front-end testing tool made on Mocha and Chai. After creating a new project, Cypress will automatically build out a folder structure that allows you to organize where your tests, fixtures, and support files are stored.

Here are some steps to maintain your test case in Cypress:

  • Avoid empty lines after each code line; there should be only logical separation to organize the test script effectively.
  • Create a separate file to store all the routes. You can create a route.js file and import it into your test script whenever required.
  • During the installation of Cypress, many important files get created that can be ignored while committing your change in the repository. Use “.gitignore” to ignore files you do not want to track.
  • For test scenarios, test data is essential. For that, import “fakers” by creating a “fake.js” file in the fixture folder and import it in your test cases.
  • Use “webpack.config.js” to describe how Cypress files or assets should be transformed.

If you wish to learn more about Cypress testing, explore our guide on ‘exception handling in cypress‘ to enhance your testing skills.

LambdaTest

Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.

Start Free Testing
LambdaTest

Earn resume-worthy Selenium certifications that help you land a top job.

Learn More
LambdaTest

Test your web or mobile apps

Test orchestration and execution cloud of 3000+ browsers and OS

Support

24/7 support

Security

Enterprise grade security

Cloud

Fastest test execution cloud