Skip to content
Testsigma DOCS

CI/CD

Travis CI Integration with Test Management by Testsigma


Integrate Travis CI with Test Management by Testsigma and automate your test runs and generate test reports.


Integrate Travis CI with Test Management by Testsigma to automate test executions and generate test reports through CI/CD pipelines. This article discusses integrating Travis CI with Test Management by Testsigma.


Prerequisites

Before you begin, ensure:

  • You have a Project in Test Management by Testsigma and Test Runs are available.
  • You have an API token from Test Management by Testsigma.
  • You have a Travis CI account.

  1. Navigate to your project in Travis CI.

  2. Open Settings.

  3. Under Environment Variables, add the following:

    • Name: TESTSIGMA_API_TOKEN
    • Value: API token from Testsigma

  1. Navigate to your Travis CI repository.

  2. Open or create the .travis.yml file in the root directory.

  3. Add the following code into the .travis.yml file:

    language: java
    jdk:
    - openjdk8
    env:
    global:
    - TESTSIGMA_API_TOKEN=${TESTSIGMA_API_TOKEN}
    script:
    # 🔨 Build and test using Maven
    - echo "Running Maven build and tests..."
    - mvn clean package
    after_success:
    # 📤 Upload JUnit report to Testsigma
    - echo "Uploading JUnit results to Testsigma..."
    - curl --location 'https://test-management.testsigma.com/api/v1/projects/{Project_ID}/junit-import/test-run/{Run_ID}' \
    --header "Authorization: Bearer $TESTSIGMA_API_TOKEN" \
    --form "junit_xml=@target/surefire-reports/TEST-MyTests.xml"

  1. Push a commit to the main (or configured) branch.

  2. Travis CI will run the workflow.

  3. After completion, the corresponding test run in Test Management by Testsigma will be automatically updated with the test execution results.