Bird
0
0

Given this cypress.config.js snippet, what type of report files will be generated after running tests?

medium📝 Predict Output Q4 of 15
Cypress - CI/CD and Reporting
Given this cypress.config.js snippet, what type of report files will be generated after running tests?
reporter: 'mochawesome',
reporterOptions: {
  reportDir: 'cypress/reports',
  overwrite: false,
  html: true,
  json: true
}
AOnly HTML reports saved, overwriting previous files
BOnly JSON reports saved, overwriting previous files
CBoth HTML and JSON reports saved in 'cypress/reports' without overwriting previous files
DNo reports generated due to missing 'overwrite' option
Step-by-Step Solution
Solution:
  1. Step 1: Analyze reporter options

    html: true and json: true means both report types are generated.
  2. Step 2: Check overwrite setting

    overwrite: false ensures new reports do not overwrite existing ones.
  3. Step 3: Confirm report directory

    Reports will be saved in 'cypress/reports' as specified.
  4. Final Answer:

    Both HTML and JSON reports saved in 'cypress/reports' without overwriting previous files -> Option C
  5. Quick Check:

    html + json true + overwrite false = multiple reports [OK]
Quick Trick: html and json true with overwrite false saves multiple reports [OK]
Common Mistakes:
  • Assuming overwrite defaults to true
  • Thinking only one report type is generated
  • Believing missing options prevent report generation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes