Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

CircleCI

Testsigma offers webhooks any CLI tool can call: a CircleCI job triggers a test plan on each code change and gates deployment on the result.

Prerequisites

  • A CircleCI account connected to your source control (GitHub, Azure, etc.).
  • A CI/CD pipeline in CircleCI.
  1. Create an API key: in Testsigma, go to Settings > API Keys and create a key. It authenticates the trigger requests coming from CircleCI.

  2. Copy the test plan ID: open the test plan the pipeline should run and copy its ID from the CI/CD Integrations tab in the test plan details.

  1. Copy the script: take the generic trigger script from the shell script page.

  2. Set your values: update the API key and test plan ID in the script.

  3. Commit it: upload the script file to your code repository (GitHub, Bitbucket, Azure, or similar) and commit.

  1. Pick the project: in CircleCI, create a new project or select an existing one, then click Setup Project.

  2. Add the job: in config.yml, add a job that makes the script executable and runs it. If you start from a CircleCI template, the job belongs in the section that begins with the comment run tests!.

    config.yml
    # Java Maven CircleCI 2.0 configuration file
    #
    # Check https://circleci.com/docs/2.0/language-java/ for more details
    #
    version: 1.0
    jobs:
    build:
    steps:
    - run: chmod a+x ./trigger_testsigma_tests_and_wait.sh
    - run: ./trigger_testsigma_tests_and_wait.sh
  3. Start the build: click Start Building at the top right. A dialog states that CircleCI will add the config.yml to the selected repository; click Add Config. CircleCI takes you to the Pipelines page.

From now on, every change to the repository triggers a build, and the build starts the test plan in Testsigma. The script waits until the run completes and checks that the tests passed.

Was this page helpful?