0
0
PyTesttesting~5 mins

Running PyTest in Jenkins - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ACreate a Jenkins job and add a build step to run PyTest
BInstall PyTest plugin in Jenkins
CWrite tests in Jenkinsfile
DRestart Jenkins server
Which command runs PyTest tests in a folder named 'tests'?
Apytest -run tests
Bpytest run tests
Crun pytest tests
Dpytest tests/
How can Jenkins display PyTest test results in its interface?
ABy running PyTest in verbose mode
BBy publishing JUnit XML reports generated by PyTest
CBy installing PyTest UI plugin
DBy saving test logs as text files
What option tells PyTest to create a JUnit XML report?
A--junitxml=report.xml
B--xmlreport=report.xml
C--report=xml
D--output=report.xml
Which Jenkins build step is commonly used to run PyTest commands?
AExecute Python script
BInvoke Ant
CExecute shell
DRun batch command
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.