CI/CD & Test Pipelines
Dashboard
Topic 10/13
Home โ€บ Testing โ€บ CI/CD & Test Pipelines

โš™๏ธ CI/CD & Test Pipelines

Continuous Integration, Jenkins setup, GitHub Actions workflows, Maven test execution, and HTML reports.

What is CI/CD in Testing?

Continuous Integration (CI) automatically builds and runs automated test suites every time code is pushed to a Git repository, catching bugs immediately.

Running Tests via Maven CLI

Executing Maven commands to trigger TestNG or JUnit tests from command line or CI runners.

terminal Bash
# Run all test suites
mvn clean test

# Run specific TestNG suite
mvn test -DsuiteXmlFile=testng.xml

GitHub Actions Test Automation Workflow

Automating test runs on every pull request using GitHub Actions.

maven-test.yml YAML
name: Run Automation Tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout Repository
      uses: actions/checkout@v3

    - name: Set up JDK 17
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'temurin'

    - name: Run Automation Tests
      run: mvn test -DsuiteXmlFile=testng.xml

Test Reporting & CI Integration

Generate HTML reports (ExtentReports, Allure) and publish test artifacts automatically upon pipeline completion.

Tip: Set up failure alerts (Slack / Email notifications) in your CI pipeline when automation regression runs fail.