CI/CD Testing with Jenkins and GitHub Actions
Harry
· 21 Sep 2026
· 1 views
Log in to track your progress and mark lessons complete.
Sponsored
Introduction to CI/CD Testing
Continuous Integration builds and tests every push; Continuous Delivery keeps every green build releasable. QA gates the pipeline: red tests block the merge.
Jenkins for Test Automation
pipeline {
agent any
stages {
stage("Build") { steps { sh "mvn -B clean package" } }
stage("Test") { steps { sh "mvn -B test" } }
stage("API") { steps { sh "newman run api-tests.json" } }
stage("UI") { steps { sh "mvn -B -Dtest=SmokeSuite test" } }
}
post { always { junit "target/surefire-reports/*.xml" } }
}GitHub Actions Equivalent
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with: { java-version: 17 }
- run: mvn -B clean verifyAutomated Regression and Docker
- Run the full regression nightly, smoke on every PR.
- Run tests in Docker (maven:3.9 image + mysql service) for identical environments everywhere.
- Publish JUnit XML so trends and flaky tests are visible.
Test Reports in CI/CD
Archive surefire reports, Newman HTML and Selenium screenshots as build artifacts; link them from the PR so reviewers see proof, not promises.
- Every merge runs tests; no exceptions.
- Nightly full regression, per-PR smoke.
- Flaky tests are bugs: quarantine and fix them fast.