Reading about Jenkins is not enough. You need to actually set it up, break it, fix it, and run real tests through it. Here are hands-on exercises ordered from beginner to advanced.
Exercise 1: Install and Run Jenkins
Install Jenkins using Docker (docker run command from Lesson 3).
Complete the setup wizard. Install suggested plugins.
Verification: You see pass/fail counts in the TestNG report.
Exercise 4: Create a Pipeline Job
Create a Jenkinsfile in your project root (use the template from Lesson 6).
Push it to your Git repo.
Create a Pipeline job in Jenkins. Set "Pipeline script from SCM." Point to your repo.
Run the pipeline. Watch the stage view — each stage should light up green.
Verification: Pipeline completes with Checkout > Build > Run Tests > Publish Reports.
Exercise 5: Parameterized Pipeline
Add parameters block to your Jenkinsfile (browser, environment, suite, headless).
Push the updated Jenkinsfile.
Run the pipeline once (first run discovers parameters).
Click "Build with Parameters" — select Firefox, staging, testng-smoke.xml.
Verification: Console output shows Maven running with -Dbrowser=firefox.
Exercise 6: Cron-Scheduled Pipeline
Add a cron trigger to your Jenkinsfile: triggers { cron("H/5 * * * *") }
Push and wait. Within 5 minutes, Jenkins should auto-trigger the build.
Check the build cause — it should say "Started by timer."
Change to a realistic schedule: triggers { cron("H 2 * * 1-5") }
Verification: Build triggers automatically without clicking "Build Now."
Exercise 7: GitHub Actions Workflow
Create .github/workflows/tests.yml in your project (use template from Lesson 12).
Push to GitHub.
Go to your repo > Actions tab. You should see the workflow running.
Check the test results and downloaded artifacts.
Verification: Green checkmark on your commit in GitHub.
Do not skip Exercise 1-4. If you cannot explain "I set up Jenkins, created a pipeline, and ran my Selenium tests through it" in an interview, all the theory is worthless. Get your hands dirty.
Key Point: Hands-on practice is non-negotiable. Install Jenkins, create jobs, write Jenkinsfiles, set up triggers, and run real Selenium tests through the pipeline.