GitLab CI
GitLab pipelines run the Testsigma shell script as a build job. Commit the script to the project, call it from the CI/CD configuration file, and every pipeline run triggers the test plan.
Prerequisites
- A GitLab account, a Testsigma API key, and the test plan ID.
Configure the pipeline
Section titled “Configure the pipeline”-
Log in: Sign in to your GitLab account.
-
Create a project: Click New project and create a blank project or a CI/CD project, as you prefer. On the create project page, enter the details and click Create project.
-
Open the jobs page: Navigate to CI/CD and click Jobs.
-
Create the configuration file: Click Create CI/CD Configuration file to create a YML file, or use this sample job:
.gitlab-ci.yml stages:- buildbuild-code-job:stage: buildscript:- echo "Calling Shell Script of testsigma"- pwd- ls -la- chmod a+x gitlabcicd.sh- ./gitlabcicd.sh -
Set the script inputs: The shell script (
gitlabcicd.shhere) triggers the test plan and fetches the run result. In it, replace theTESTSIGMA_API_KEYandTESTSIGMA_TEST_PLAN_IDvalues. The key comes from Settings > API Keys, the plan ID from Test Plans > CI/CD Integrations. -
Commit: Click Commit changes. The job starts to run, and the test plan configured in the script starts with it.
Check the result
Section titled “Check the result”Once the job completes, the execution report is saved as an XML file at the path set in the shell script. The job’s detail page shows the run outcome.
Was this page helpful?
Thanks for the feedback.