Bird
0
0

After executing the command:

medium📝 Predict Output Q4 of 15
Selenium Python - CI/CD Integration
After executing the command:
pytest integration_tests/ --junitxml=ci_report.xml
in a CI environment, what is the expected outcome?
ATest results will be printed only to the console without any file output.
BTests will run but no report file will be created automatically.
CThe command will fail because '--junitxml' is not a valid pytest option.
DA JUnit XML report named 'ci_report.xml' is generated containing test results.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the pytest option

    The --junitxml=ci_report.xml option tells pytest to generate a test report in JUnit XML format saved as 'ci_report.xml'.
  2. Step 2: Effect in CI environment

    When run in CI, this XML report can be consumed by CI tools for test reporting and analysis.
  3. Final Answer:

    A JUnit XML report named 'ci_report.xml' is generated containing test results. -> Option D
  4. Quick Check:

    Check for the presence of the XML file after test execution [OK]
Quick Trick: Use --junitxml to generate XML report file [OK]
Common Mistakes:
  • Assuming no report is generated without additional plugins
  • Confusing console output with report files
  • Believing '--junitxml' is deprecated or invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes