Organizing Cypress Tests

Learn how to organize your tests in Cypress.

The file structure required for Cypress testing

Cypress requires a particular file structure for our tests to work. For end-to-end tests, we need a cypress folder in our base directory and a e2e folder inside it. Our test files must end with the .cy.ts extension for Cypress to recognize them as tests.


Let’s consider the following structure of the webpage we need to test.

Get hands-on with 1200+ tech skills courses.