Travis CI
Travis CI builds trigger Testsigma test plans through webhooks callable from any CLI tool. The build runs the shell script, waits for the tests, and checks they passed before deployment.
Prerequisites
- A Travis CI account with connected source code management.
- A CI/CD pipeline.
Get the API key and test plan ID
Section titled “Get the API key and test plan ID”-
Generate the key: Navigate to Settings > API Keys and click Generate API Key. On the Generate API Key overlay, enter a Key Name and click Generate API Key.
-
Copy it: On the API Keys page, hover over the generated key and click Copy API Key. This key authenticates the remote trigger requests from Travis CI.
-
Get the test plan ID: Navigate to Test Plans > Test Plan > CI/CD Integrations. The execution ID is in the REST API call to start Test Plan section. It tells the script which plan to trigger.
Update the shell script
Section titled “Update the shell script”The script lives in your code repository, on GitHub, Bitbucket, Azure, or any such platform, and carries the commands that trigger the test plan remotely. Copy the generic shell script, then set your API key and test plan ID in it.
Configure the Travis CI pipeline
Section titled “Configure the Travis CI pipeline”-
Save the script: Store it in the repository as
scripts/trigger_testsigma_tests_and_wait.sh. -
Make it executable: Run
chmod ugo+x scripts/trigger_testsigma_tests_and_wait.sh. -
Commit it: Commit the script to your repository.
-
Call it from the build: Add it to the
script:phase of.travis.yml:.travis.yml script:- ./scripts/trigger_testsigma_tests_and_wait.sh
With this in place, any change to the repository triggers a build, and the build starts the tests in Testsigma. The script waits until the run completes and verifies that the result is passed.
Was this page helpful?
Thanks for the feedback.