GitLab integration
If you use Katalon Studio for testing, you can integrate your tests into your GitLab CI/CD pipeline. This setup allows your tests to run automatically with each project update.
You can 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 on this GitHub repository: CI samples.
- GitLab Runners configured in your project. For more information about GitLab Runner, refer to this GitLab document: Ensure you have runners available.
- For self-hosted GitLab Runners, you need to install and run Docker. For installation instructions, see this Docker document: Get Docker.
- An active Katalon Runtime Engine floating license. See KRE floating license.
- 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 jobs 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.