0
0
Cypresstesting~20 mins

Cypress folder structure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cypress Folder Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identify the purpose of the 'fixtures' folder in Cypress

In a typical Cypress project, what is the main purpose of the fixtures folder?

ATo hold custom commands and reusable functions
BTo keep the test specification files with test cases
CTo contain screenshots and videos from test runs
DTo store test data files like JSON or CSV used during tests
Attempts:
2 left
💡 Hint

Think about where you keep sample data that tests can load.

🧠 Conceptual
intermediate
2:00remaining
Role of the 'support' folder in Cypress

What is the primary role of the support folder in a Cypress project?

ATo keep the test specification files
BTo store reusable code like custom commands and global configurations
CTo save screenshots and videos from test runs
DTo hold environment configuration files
Attempts:
2 left
💡 Hint

Think about where you put code that helps tests but is not a test itself.

Predict Output
advanced
2:00remaining
Number of test files in 'integration' folder after adding tests

Given the following Cypress folder structure, how many test files will Cypress recognize inside the integration folder?

cypress/
  integration/
    login.spec.js
    signup.spec.js
    dashboard/
      overview.spec.js
      stats.spec.js
  fixtures/
  support/
A4
B3
C2
D5
Attempts:
2 left
💡 Hint

Count all .spec.js files including those in subfolders.

locator
advanced
2:00remaining
Best folder to place environment-specific config files in Cypress

Where should you place environment-specific configuration files in a Cypress project to keep them organized and easily accessible?

AInside the <strong>cypress</strong> root folder alongside <code>fixtures</code> and <code>support</code>
BInside the <strong>fixtures</strong> folder
CInside the <strong>integration</strong> folder
DInside the <strong>support</strong> folder
Attempts:
2 left
💡 Hint

Think about where config files should live so they are not mixed with test code or test data.

framework
expert
3:00remaining
Order of Cypress folder loading during test execution

In what order does Cypress load these folders when running tests?

  1. support
  2. fixtures
  3. integration
A3,2,1
B1,2,3
C2,1,3
D1,3,2
Attempts:
2 left
💡 Hint

Consider when test data, support code, and test specs are loaded.