Table of Contents
Enroll in Selenium Training

Katalon Studio supports console mode execution. Additionally, we can utilize it for integration with popular CI tools such as Jenkins and TeamCity. Subsequently, this tutorial shows you the necessary steps to set up integration with a Jenkins server for scheduling Katalon's execution. We will cover the below topics in this article, Integration with Jenkins and other CI tools:-

  • Prerequisites
  • Configuration Steps
    • Exit Codes
    • Publish JUnit Reports

Prerequisites

Here are the requirements to be prepared for Jenkins integration:

  1. Firstly, you must have already installed Jenkins for Windows (click https://jenkins.io/doc/book/installing/ for a guide) and the browser you’d like to use for the test.
  2. Secondly, the CI tool is installed and configured correctly. In this example, we will use Jenkins. It is a popular and easy-to-integrate CI tool.
  3. Additionally, the command will invoke Katalon Studio for execution. Therefore, the requirement of a Katalon build exists for each execution machine.

Configuration Steps

  1. Firstly, go to Manage Jenkins > Manage Plugins > Available tab and find Katalon plugin on the list. After that, select and click Install.

Install Katalon DevOps plugin_Integration with Jenkins and other CI tools

  1. Secondly, create a job by selecting New Item in Jenkins

Katalon Jenkins Create new item

  1. Thirdly, tell Jenkins your workspace or simply use git. After that, enter the job name (e.g., “Katalon Studio Tests”), and then choose “Freestyle Project”. There is a sample Katalon Studio project on Github (https://github.com/katalon-studio-samples/ci-samples) for a quick test.

Create and configure a new Jenkins project_Enter an item name

  1. Next, tell Jenkins your workspace or simply use git. There is a sample Katalon Studio project on Github (https://github.com/katalon-studio-samples/ci-samples) for a quick test.

Create and configure a new Jenkins project_Specify your workspace

  1. Fifthly, add and configure the build step, Execute Katalon Studio tests.

Create and configure a new Jenkins project_Execute Katalon Studio tests

Exit Codes

When you execute the Katalon Studio command from CI, an exit code will generate as the output. Moreover, you can use this exit code to know whether your execution is successful, passed, or failed.

Katalon Exit code_Integration with Jenkins and other CI tools

Below is the list of exit codes:

  • 0: the execution passed with no failed or erroneous test case.
  • 1: the execution has failed test cases.
  • 2: the execution has erroneous test cases.
  • 3: the execution has failed test cases and erroneous test cases.
  • 4: the execution cannot start because of invalid arguments.

Additionally, to check the test execution report in Katalon, please refer to this guide.

Publish JUnit reports

Starting from Katalon Studio version 7.0, Katalon Studio automatically generates test results of a test suite in the JUnit format with the JUnit_Report.xml file name.

*Note: For the users of Katalon Studio Enterprise, test suite collections’ reports are available in the JUnit format.

Basic Report plugin is available from Katalon Studio version 6.1.5 and later versions. Therefore, test results in JUnit format can automatically export with the file name JUnit_Report.xml

12_Integration with Jenkins and other CI tools

Katalon Studio integration with GIT
Katalon Studio integration with GIT
Previous Article
A Guide on Integrating Katalon Studio with TestRail
A Guide on Integrating Katalon Studio with TestRail
Next Article

Similar Articles

Feedback