Challenge - 5 Problems
Jenkins Selenium Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Jenkins CLI command output
What is the output of this Jenkins CLI command when listing all jobs in a Jenkins instance with two jobs named 'BuildApp' and 'TestApp'?
Selenium Python
java -jar jenkins-cli.jar -s http://localhost:8080/ list-jobsAttempts:
2 left
💡 Hint
The list-jobs command outputs job names separated by new lines.
✗ Incorrect
The list-jobs command lists all job names line by line. So the output will be the job names separated by new lines.
❓ Configuration
intermediate2:00remaining
Jenkins Pipeline to run Selenium tests
Which Jenkinsfile snippet correctly defines a pipeline stage to run Selenium Python tests using a virtual environment?
Attempts:
2 left
💡 Hint
The virtual environment's pip and python executables must be used explicitly.
✗ Incorrect
Option A correctly creates a virtual environment, installs dependencies inside it, and runs tests using the virtual environment's python executable.
❓ Troubleshoot
advanced1:30remaining
Jenkins Selenium test failure due to missing display
A Jenkins job running Selenium tests on a Linux server fails with the error 'selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find X display'. What is the most likely cause?
Attempts:
2 left
💡 Hint
Selenium needs a graphical environment to run browser tests unless using headless mode.
✗ Incorrect
The error indicates Selenium cannot find a graphical display. On headless Linux servers, an X server or virtual display like Xvfb is needed.
🔀 Workflow
advanced1:30remaining
Jenkins pipeline steps for Selenium test automation
In a Jenkins pipeline for Selenium Python tests, which sequence of steps is the correct order to ensure tests run successfully?
Attempts:
2 left
💡 Hint
You must have the code before setting up environment and installing dependencies.
✗ Incorrect
First, Jenkins checks out the code, then sets up the environment, installs dependencies, and finally runs tests.
✅ Best Practice
expert2:00remaining
Best practice for Jenkins Selenium test reports
Which Jenkins configuration is best to collect and display Selenium Python unittest XML test reports after a pipeline run?
Attempts:
2 left
💡 Hint
Jenkins has built-in support for JUnit XML reports to visualize test results.
✗ Incorrect
Option A uses Jenkins' native JUnit report publisher to parse and display test results in the UI, which is the best practice.