CircleCI Integration - Katalon Orb
Katalon TestOps CI is another way to execute or schedule Katalon Studio tests remotely. To learn more about Katalon TestOps CI, see Test Planning Overview.
Orbs are shareable packages of configuration elements, including jobs, commands, and executors. See CircleCI documents about Orbs: Orbs Introduction Cloud.
Katalon Orb enables you to execute Katalon tests with your CircleCI CI/CD pipeline. We recommend getting the latest version from the CircleCI Orb registry page. Download the latest Katalon Orb on CircleCI: katalon/katalon-studio.
Setup and Configuration
- Katalon Studio version 7.0.0 onwards.
- An active Katalon Runtime Engine license.
To run your test with Katalon Orb, you need to establish a connection between your Katalon project in GitHub and CircleCI. Log in to CircleCI using your GitHub account.
Prepare Your Project In GitHub
Use your repository on GitHub or create a new one to store your Katalon project code.
To run the test in CircleCI, create a
.circlecifolder in the GitHub repository and add a
.ymlfile containing Katalon commands (e.g.,
katalon-studio-samples/ci-samples/.circleci/config.yml), then commit. See the example of the
Notes: You can only configure
katalonstudio/runto run Katalon tests in the Orb source code. For the supported options, see Command syntax document.
Configure Environment Variables In CircleCI
Download the latest Katalon Orbs in CircleCI: katalon/katalon-studio
In CircleCI, click Go to application.
The Application page appears. Choose a Git Organization.
In your preferred project, select Projects Settings.
The Project Settings page appears. Select Environment Variables.
Import Variables or Add Variable to your project. E.g., KATALON_API_KEY.
Execute tests with Katalon Orb
Katalon Orb automatically executes Katalon tests after each commit to the configured GitHub repository.
To execute tests with Katalon Orb, go to CircleCI, then navigate to Projects > Branch, select Run Pipeline.
After running Katalon tests in CircleCI, you can download test execution reports in the Artifact tab.
For CI sample projects of Katalon Studio, see CI Samples.
Below is an example demonstrating how to use Katalon Orb to execute a test suite with the latest version of Katalon Studio.
version: 2.1 orbs: katalon-studio: firstname.lastname@example.org workflows: build: jobs: - katalon-studio/run: version: latest command_arguments: >- -browserType='Chrome' -retry=0 -statusDelay=15 -testSuitePath='Test Suites/TS_RegressionTest'
In case you prefer setting up the integration manually, you can refer to the section below.
E2E testing integration with CircleCI
Introduction to CircleCI
CircleCI is a continuous integration server where every commit executes an automated build and test. In this case, automated tests are integrated into a shared repository, can be configured to run at specific times and managed by all team members. You can read more about CircleCI features on the official website.
The most important thing - config.yml file
To run Katalon tests on CircleCI, you need to:
Have a repository on GitHub or create a new one;
Add .yml file into .circleci folder (keep in mind that a folder with a period will be hidden by default) and commit to your GitHub repository.
Here you can see an example of config.yml file that you need to add to the .circleci folder and commit to your GitHub repository together with your tests. Pay attention to folder structure - .circleci should be in the Katalon Studio Project Folder.
Keep in mind that this configuration can be changed according to your preferences. I run my tests from TestSuitCollection folder so I added a command option -testSuiteCollectionPath=
When the config.yml file is ready and committed, you should go to the CircleCI platform and follow these steps:
Sign up to the CircleCi platform (use your GitHub account to join the platform);
Add and set up your project (the initial condition is - you must have GitHub repository permissions to view or follow associated projects). After registering to circleci you should be able to see this window (see the image below). You just need to click Set Up Project and Start Building (you do not need to configure a yml file because you have done it previously).
After “start building” is clicked and at least one change pushed, you will be able to see a job’s status - running, success, failed, on hold, queued. You can see more details by clicking on the status and expanding section details or moving and tracking your test result report on Katalon TestOps (read the chapter below on how to do that).
Upload results to Katalon TestOps
To analyze test results, you can integrate Katalon Studio with Katalon TestOps. This way you are able to get generated and detailed reports after every completed build in CircleCI. In order to send your test results to Katalon Studio TestOps you need to:
- Navigate and Login/Sign Up to Katalon TestOps;
- Open your Katalon Studio Project and Click ‘Project’ from the main menu;
- Select Settings -> Katalon TestOps -> Fill in Katalon TestOps information;
- Click Apply -> Ok;
- Return to Katalon TestOps;
- Create a new project;
- Set Up Grid to automatically send results to TestOps;
Congratulations - now your test results should be able to reach Katalon TestOps after every completed build.
Switch environments easily by using Profiles
In this section, I will describe how to set up the same tests to run in several environments. Katalon Studio has a feature that creates a Profile. When you starting creating a Katalon Studio project a default profile is created. We can assume that the default profile is your dev environment. So, you wrote a lot of tests in the dev environment and you need to run the same tests on prod. Follow these steps to make it real:
- Create a separate test ‘NavigateToUrl’, add a global variable:
- Add the created variable to the default profile, set an environment url:
Create another Profile, e.g. prod, set another environment url;
Create a New Test Suite Collection, Add Test Suites to created Collection and configure which browsers, profiles to run.
Katalon Studio can be integrated with many useful tools you just need to set up everything right and have an amazing automated solution for your project.
Automation processes should not be painful and hard to do. Don’t forget one of Agile’s principles - “Simplicity is the art of maximizing the work not done”.