GitLab integration
Suppose you are an automation tester using Katalon Studio for testing. In that case, you can integrate your Katalon Studio tests into your GitLab CI/CD and set up your tests to be triggered when there is a new update in your project.
You will run your GitLab CI/CD jobs in a Docker container built from the Katalon Docker Image (KDI), which includes the latest versions of Google Chrome, Mozilla Firefox, and Katalon Studio. This Docker image is available on Docker Hub.
- A GitLab account.
- A Katalon Studio project in GitLab. You can clone or download the sample project from the CI samples GitHub repository.
- GitLab Runners configured in your project. For more information about GitLab Runner, see Ensure you have runners available.
- For self-hosted GitLab Runners, you need to install and run Docker. For installation instructions, see Get Docker.
- An active Katalon Runtime Engine floating license. For details, see Types of licenses.
- The
.gitlab-ci.yml
file: A file containing CI/CD configurations. - Katalon API key variable: A key representing your credentials for Katalon Studio and Katalon Runtime Engine.
Configure the .gitlab-ci.yml
file
The .gitlab-ci.yml
file contains settings that direct the GitLab CI/CD pipeline to execute Katalon Studio tests within a Docker environment.
.gitlab-ci.yml
file, follow these steps:Configure the Katalon API Key variable
In the sample .gitlab-ci.yml
file, we use the KATALON_API_KEY
to represent the Katalon API key. You need to define this variable and specify its value in the project's settings.
Test the pipeline
After the configuration, you can start making changes to the project to test the CI/CD pipeline. GitLab CI/CD monitors the changes and runs the job specified in the .gitlab-ci.yml
file.
To view the jobs running in your project, on the left sidebar, go to CI/CD > Jobs, and select a job.
GitLab displays our job log as follows:
The job log should display information about the Docker image in use and the output of the configured katalonc
command.
To view test reports on TestOps, you can enable Katalon TestOps integration in your project. See TestOps integration.