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

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.
  1. Log in: Sign in to your GitLab account.

  2. 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.

  3. Open the jobs page: Navigate to CI/CD and click Jobs.

  4. Create the configuration file: Click Create CI/CD Configuration file to create a YML file, or use this sample job:

    .gitlab-ci.yml
    stages:
    - build
    build-code-job:
    stage: build
    script:
    - echo "Calling Shell Script of testsigma"
    - pwd
    - ls -la
    - chmod a+x gitlabcicd.sh
    - ./gitlabcicd.sh
  5. Set the script inputs: The shell script (gitlabcicd.sh here) triggers the test plan and fetches the run result. In it, replace the TESTSIGMA_API_KEY and TESTSIGMA_TEST_PLAN_ID values. The key comes from Settings > API Keys, the plan ID from Test Plans > CI/CD Integrations.

  6. Commit: Click Commit changes. The job starts to run, and the test plan configured in the script starts with it.

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?