Bird
0
0

Which pytest command option generates a test report in XML format suitable for CI tools?

easy📝 Syntax Q12 of 15
Selenium Python - CI/CD Integration
Which pytest command option generates a test report in XML format suitable for CI tools?
A--html=report.html
B--junitxml=report.xml
C--json=report.json
D--output=report.txt
Step-by-Step Solution
Solution:
  1. Step 1: Recall pytest report options

    Pytest uses --junitxml to create XML reports compatible with many CI tools.
  2. Step 2: Match option to XML report

    Among the options, only --junitxml=report.xml generates the correct XML format for CI.
  3. Final Answer:

    --junitxml=report.xml -> Option B
  4. Quick Check:

    Pytest XML report = --junitxml [OK]
Quick Trick: Use --junitxml for CI XML reports in pytest [OK]
Common Mistakes:
  • Using --html instead of --junitxml
  • Confusing JSON or text output with XML
  • Missing the file name after the option

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes