Skip to main content

Katalon CLI

The Katalon Command-line Interface (CLI) Docker Image allows you to trigger test execution from existing test schedules on TestOps. You can use this image to integrate with your desired CI/CD pipeline and trigger execution upon code changes.

Katalon CLI is available on Docker Hub: Katalon CLI.

This guide lists out the available configurations and sample use cases with the image.

Prerequisites

  • A valid TestOps account with the necessary permissions to trigger executions.

  • Access to a compatible CI/CD environment with Docker installed.

Usage

With Docker installed and running, you can start triggering a schedule.
docker run katalonstudio/katalon-cli schedule <parameters>
Parameters
  • --api-key: your Katalon API key, see: Katalon API key.

  • --username and --password: the username and password of your TestOps account.

  • --project-id: the ID of the project that contains your test schedule. This parameter is not required when usingIDS_EXACT_MATCHES for operator.

  • --operator=<IDS_EXACT_MATCHES | NAME_CONTAINS | NAME_STARTS_WITH | NAME_ENDS_WITH>: the operator to filter the schedule, by id or by naming pattern.

  • --values: the value that corresponds with the operator in use.

Environment variables: You can use environment variables instead of parameters.
  • API_KEY
  • USERNAME
  • PASSWORD
  • PROJECT_ID
  • OPERATOR
  • VALUES

Trigger command for TestOps schedules

To trigger an existing schedule on TestOps, you need to retrieve the schedule information, specifically the ID of your TestOps project and the ID of the test schedule.

In your TestOps project, go to Executions > Schedules, and select the desired test schedule.

You can find the project ID and schedule ID in the browser's address bar. For example, in the URL https://testops.katalon.io/team/<team-id>/project/1366723/grid/plan/618831/job, 1366723 is the project ID and 618831 is the schedule ID.

The following are some sample commands to trigger an execution from the schedule:

Trigger an execution with Katalon API key and schedule ID:
docker run katalonstudio/katalon-cli schedule trigger --api-key=xxx --operator=IDS_EXACT_MATCHES --values=618831
Trigger an execution with username / password and name pattern matching (--project-id is required). This command triggers all schedules whose names contain the word "multiple".
docker run katalonstudio/katalon-cli schedule trigger --username=john.doe@testing.com --password=password --project-id=1366723 --operator=NAME_CONTAINS --values="multiple"