Introduction to the Cypress Project Structure

Reading Time: 4 minutes

Hi Folks,
In this blog, we talk about the Cypress Project structure that is fundamentally and architecturally different from other test automation frameworks.We use this folder to store data objects or external pieces of static data that we use throughout the tests

Cypress Folder Structure

  • Let’s understand the folder structure in cypress project, it defines entire architecture and the workflow of whole system
  • If we know the folder structure then, we can change the architecture, add other required files and data in a proper place, debug easily and many more
  • Cypress has created a default folder hierarchy when it opens the first time.


  • It is the major folder which contains all the tests, required files, supports, plugins.
  • Let’s understand these folders and their purpose in cypress.

1. Fixture

  • We can use this folder to store our Test Data
  • We should not hard code data in the test case.
  • Usually the data is store in JSON format,but it can be drive from an external source like csv, html, json, txt etc.
  • Cypress is suggesting us to put all your test data in the fixture so that you can load directly in your tests.

For example : we need login credentials like username and password to login which are kept inside this folder as a file.

2. Integration

  • This is the folder we used to write all our test cases under example
  • We can create a sub-folder under the integration directory and add test’s under that.
  • The test files may be written as .js, .jsx, .coffee and .cjsx
  • Usually the preferred extension is .js and the test file name format is test-name.spec.js

3. Support

There are two files inside the support folder :
a) commands.js
b) e2e.js

a) command.js

  • It is the file where you add your commonly used functions(Reusable Methods) and custom Commands.
  • Once defined in this file they are automatically available to your test cases.
  • for example you may call to use in tests, such as the login function.

b) e2e.js

  • This file runs before every single spec file/test case.
  • It is a great place to put global configuration and behavior that modifies Cypress like before or before each.

4. Videos

  • Cypress records a video for each spec file when running tests during cypress run.
  • Videos are not automatically recorded during cypress open. Videos are stored in the videos folder which is set to cypress/videos by default.
  • For more details you can check here

5. Screenshots

  • Cypress comes with the ability to take screenshots, whether you are running via cypress open or cypress run.
  • To take a manual screenshot you can use the cy.screenshot() command.
  • The screenshot gets stored in the cypress/screenshots folder by default.
  • For more details you can check here

6. cypress.config.js

  • When we first time  open Cypress Test Runner, it creates a cypress.config.js file.
  • The cypress.config.js file at the root of your project directory is the default place for your Cypress configurations
  • we will set all the properties on which and how your cypress test should behave.
  • It is used to pass any configuration values we require, Certain options are set by default in Cypress.
  • we can customize them according to our project.
  • To identify the default values set by Cypress, navigate to the Settings folder in our Cypress Test Runner

7. package.json

  • Package.json is a file which contains the name and its version of all the dependencies that are required in our project.
  • If we look at the devDependencies, it includes cypress as a key and its version (10.3.0).

That’s all for this blog. Hope you found some information from this. In case of any queries you can contact me over my email id
To read other blogs related to cypress you can check here


Written by 

Akash is a QA Consultant he is familiar with core concepts of manual & automation testing using tools like Cypress,Selenium, and Postman Also having knowledge of Core Java & Java script. He is always eager to learn new and advanced concepts in order to improve himself.