Recall & Review
beginner
What is external test data in software testing?
External test data is information used in tests that is stored outside the test scripts, such as in files or databases, allowing tests to use different inputs without changing the code.
Click to reveal answer
beginner
How does using external test data improve test maintainability?
It separates test logic from data, so when data changes, you only update the data files, not the test code, making tests easier to maintain and less error-prone.
Click to reveal answer
intermediate
In Cypress, where can external test data be stored?
External test data in Cypress can be stored in JSON files inside the fixtures folder, or loaded from external APIs or databases during test execution.
Click to reveal answer
beginner
What is a real-life example of why separating test data helps?
Like a recipe book where ingredients are listed separately from instructions, changing ingredients (test data) doesn’t require rewriting the cooking steps (test code).
Click to reveal answer
beginner
What happens if test data is hardcoded inside test scripts?
Tests become harder to update and reuse because every data change requires editing the test code, increasing the chance of mistakes and slowing down maintenance.
Click to reveal answer
Why is external test data preferred over hardcoded data in tests?
✗ Incorrect
External test data lets you update inputs without changing the test scripts, improving maintainability.
Where does Cypress typically store external test data?
✗ Incorrect
Cypress uses the fixtures folder to keep external test data in JSON files.
What is a key benefit of separating test data from test scripts?
✗ Incorrect
Separating data allows updating inputs easily, which helps maintain tests.
If test data changes frequently, what is the best practice?
✗ Incorrect
Keeping data external makes it simple to update without touching test scripts.
What analogy helps explain external test data?
✗ Incorrect
Like ingredients separate from instructions, external data is separate from test logic.
Explain why using external test data improves the maintainability of Cypress tests.
Think about how changing data without touching code helps.
You got /4 concepts.
Describe a real-life example that illustrates the benefit of separating test data from test scripts.
Use a simple everyday example involving instructions and inputs.
You got /3 concepts.