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.
Get the API key and test plan ID
Section titled “Get the API key and test plan ID”-
Create an API key: in Testsigma, go to Settings > API Keys and create a key. It authenticates the trigger requests coming from CircleCI.
-
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.
Add the script to your repository
Section titled “Add the script to your repository”-
Copy the script: take the generic trigger script from the shell script page.
-
Set your values: update the API key and test plan ID in the script.
-
Commit it: upload the script file to your code repository (GitHub, Bitbucket, Azure, or similar) and commit.
Configure the pipeline
Section titled “Configure the pipeline”-
Pick the project: in CircleCI, create a new project or select an existing one, then click Setup Project.
-
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.0jobs:build:steps:- run: chmod a+x ./trigger_testsigma_tests_and_wait.sh- run: ./trigger_testsigma_tests_and_wait.sh -
Start the build: click Start Building at the top right. A dialog states that CircleCI will add the
config.ymlto 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?
Thanks for the feedback.