Skip to main content

CircleCI - Katalon Orb

Note:
  • Katalon TestOps CI is another way to execute or schedule Katalon Studio tests remotely. To learn more about Katalon TestOps CI, seeTest 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

Important:

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.

log in with Git

Prepare Your Project In GitHub

  1. Use your repository on GitHub or create a new one to store your Katalon project code.
  2. To run the test in CircleCI, create a .circleci folder in the GitHub repository and add a .yml file containing Katalon commands (e.g., katalon-studio-samples/ci-samples/.circleci/config.yml), then commit. See the example of the config.yml file below.

    Note:
    • You can only configure katalonstudio/run to run Katalon tests in the Orb source code. For the supported options, see Command syntax document.

    CircleCI sample config

Configure Environment Variables In CircleCI

  1. Download the latest Katalon Orbs in CircleCI: katalon/katalon-studio

  2. In CircleCI, click Go to application.

    go to application

  3. The Application page appears. Choose a Git Organization.

    choose organization

  4. In your preferred project, select Projects Settings.

    project settings

  5. The Project Settings page appears. Select Environment Variables.

    environment variables

  6. Import Variables or Add Variable to your project. E.g., KATALONAPIKEY.

    add variable

    Note:
    1. To secure your project settings, you must get the API Key from Katalon TestOps.
    2. Set KATALON_API_KEY as an environment variable in CircleCI. Do not store this API Key in source code. See also: How to create API Keys in Katalon TestOps

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.

run pipeline

After running Katalon tests in CircleCI, you can download test execution reports in the Artifact tab.



Usage Examples

Note:
  • 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: katalon/katalon-studio@23.0.11

workflows:
build:
jobs:
- katalon-studio/run:
version: "latest"
command_arguments: '-browserType="Chrome" -retry=2 -statusDelay=15 -testSuitePath="Test Suites/TS_RegressionTest"'