CI/CD Testing with Jenkins and GitHub Actions

Harry · 21 Sep 2026 · 1 views
Log in to track your progress and mark lessons complete.

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 verify

Automated 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.

CI CD quality gate pipeline - commit, build, test, report, deploy, red tests block merge

Key Points

  • Every merge runs tests; no exceptions.
  • Nightly full regression, per-PR smoke.
  • Flaky tests are bugs: quarantine and fix them fast.
Share this post:

Comments (0)

Please login or register to comment.

Create a free account to keep reading

You've enjoyed a free tutorial! Register (it's free) to unlock every tutorial, track your progress and save code.

or sign in with your account

Already have an account? Log in