Recall & Review
beginner
What is JUnit XML reporting in the context of pytest?
JUnit XML reporting is a way to output test results in an XML format compatible with many Continuous Integration (CI) tools. Pytest can generate this report to help CI systems understand test outcomes.
Click to reveal answer
beginner
How do you enable JUnit XML reporting in pytest?
You enable it by running pytest with the option
--junitxml=path/to/report.xml. This creates an XML file with the test results.Click to reveal answer
beginner
Why is JUnit XML reporting useful for Continuous Integration (CI)?
CI tools can read JUnit XML reports to show test results clearly, track failures, and provide feedback quickly. It helps automate quality checks in software development.
Click to reveal answer
intermediate
What kind of information does a JUnit XML report contain?
It contains details like test case names, status (pass/fail), error messages, execution time, and sometimes system output or logs.
Click to reveal answer
beginner
How can you customize the JUnit XML report filename in pytest?
You specify the filename and path after the
--junitxml= option, for example: pytest --junitxml=reports/results.xml.Click to reveal answer
Which pytest option generates a JUnit XML report?
✗ Incorrect
The correct option is
--junitxml=FILE to generate a JUnit XML report.Why do CI tools use JUnit XML reports?
✗ Incorrect
CI tools use JUnit XML reports to display test results in a standard, machine-readable format.
What information is NOT typically found in a JUnit XML report?
✗ Incorrect
JUnit XML reports do not include the source code of tests, only results and metadata.
How do you specify the output file for the JUnit XML report in pytest?
✗ Incorrect
The correct way is to use
--junitxml=filename.xml.If a test fails, what does the JUnit XML report include?
✗ Incorrect
JUnit XML reports include error messages and stack traces for failed tests to help diagnose issues.
Explain how to generate a JUnit XML report using pytest and why it is important for CI.
Think about how CI systems use test reports to show results.
You got /4 concepts.
Describe the key information contained in a JUnit XML report and how it helps developers.
Consider what details help understand test outcomes.
You got /5 concepts.