Recall & Review
beginner
What is Jenkins used for in running PyTest?
Jenkins automates running PyTest tests regularly or on code changes, helping catch errors early.
Click to reveal answer
beginner
Which Jenkins plugin helps run shell commands like PyTest?
The 'Execute shell' build step lets Jenkins run PyTest commands in a job.
Click to reveal answer
beginner
How do you specify the PyTest command in Jenkins to run tests in the 'tests' folder?
Use the command:
pytest tests/ in the Jenkins build step.Click to reveal answer
intermediate
Why add a 'Post-build Action' to publish PyTest results in Jenkins?
It shows test results and trends in Jenkins UI, making it easy to see test success or failure.
Click to reveal answer
intermediate
What file format does PyTest use to output test results for Jenkins to read?
PyTest can output results in JUnit XML format using
--junitxml=report.xml.Click to reveal answer
What is the first step to run PyTest in Jenkins?
✗ Incorrect
You start by creating a Jenkins job and adding a build step to run PyTest commands.
Which command runs PyTest tests in a folder named 'tests'?
✗ Incorrect
The correct command is 'pytest tests/' to run all tests inside the 'tests' folder.
How can Jenkins display PyTest test results in its interface?
✗ Incorrect
Jenkins reads JUnit XML reports to show test results and trends.
What option tells PyTest to create a JUnit XML report?
✗ Incorrect
The option '--junitxml=report.xml' generates a JUnit XML report file.
Which Jenkins build step is commonly used to run PyTest commands?
✗ Incorrect
The 'Execute shell' step runs shell commands like PyTest in Jenkins jobs.
Explain how to set up Jenkins to run PyTest tests automatically.
Think about job creation, running tests, reporting, and viewing results.
You got /4 concepts.
Describe why generating a JUnit XML report is important when running PyTest in Jenkins.
Focus on how Jenkins uses the report to help teams.
You got /4 concepts.