Skip to main content

Use Katalon plugins for Jenkins integration on Windows/macOS

This tutorial shows you how to integrate Katalon with Jenkins on Windows and macOS via the Katalon plugin for Jenkins.

Important:
  • An active Katalon Runtime Engine license. To learn more about activating the Katalon Runtime Engine license, you can refer to this document: Activate Katalon License.

Installation

Install Jenkins. Follow the instructions in the following Jenkins documents:

Execute Katalon Studio tests in Jenkins with the Katalon plugin

Install the Katalon plugin on Jenkins

To run Katalon tests on Jenkins, you need to install the Katalon plugin on Jenkins. Do as follows:
  1. Sign in to Jenkins and go to Manage Jenkins > Manage Plugins.
    The Plugin Manager page appears.
  2. Click on the Available tab and search for the Katalon plugin.
    plugin-manager
  3. Select the plugin and choose Install without restart.

Upload Katalon projects on Jenkins

After installing the Katalon plugin, you can now start the Katalon Studio test in Jenkins.

  1. In the Jenkins Dashboard, go to New Item and create a Freestyle project.

    Create a new Freestyle project

  2. To upload your Katalon project on Jenkins, you can upload your Katalon project from a Git repository or your local workspace. Here, we use a Git repository.

    • In the Source Code Management section, choose Git.
    • Enter your repository URL, then select branches to build, repository browser, and additional behaviors, if any.

      Upload Katalon project

Build your project

  1. In the Build section, click Add build step and choose Execute Katalon Studio Tests. The Execute Katalon Studio Tests box opens, asking you to input the Katalon Runtime Engine version and command arguments.jenkins - Execute Katalon Studio Tests

  2. Specify the Katalon Studio version you wish to execute with:

    • If you haven't downloaded Katalon Runtime Engine (KRE), you can input the KRE version you wish to execute with in the Download Katalon Studio version box. KRE will be downloaded and deployed automatically. You can retrieve the list of all releases on our Github repository: Releases.
    • If you want to use a pre-installed version, manually input the KRE version you have installed in the Use pre-installed Katalon Studio box with the following command line:
      <KRE stored folder>-<KRE pre-installed-version>
      For example: /Users/USERNAME/Downloads/Katalon_Studio_Engine_MacOS-8.1.0.
  3. Input your command in the Command arguments box:

    Here is a sample of command arguments to run test with TestCloud configurations. You can generate the Command arguments for tests with TestCloud configurations by using Katalon Studio Command Builder. To understand about the syntax of the command, see: Command-Line Syntax in Katalon Runtime Engine.

    -browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/TS_RegressionTest" -apikey=<YOUR_API_KEY>

    jenkins build command arguments
    Warning:
    • When you use the Katalon plugin on Jenkins, or copying commands generated by Command Builder from Katalon Studio, please remove argument -noSplash and -runMode=console.

    Note:
    • If you belong to more than one Organization subscribing to Runtime Engine licenses, you can choose which Organization validates your license usage with the following command line: -orgID=<Katalon_OrgID>.
    • Make sure your current browser version is compatible with the KRE Webdriver version. To learn more about upgrading or downgrading WebDrivers, you can refer to this document: Update or Downgrade WebDrivers.
  4. After you are done with the configuration, click Save, then click Build Now to run the project.

  5. To view the console log, click on your current build on Jenkins and select Console Output.

    View console output

Troubleshoot empty videos recorded after running tests on Windows

If you encounter an issue of having empty videos recorded after running your tests in Jenkins on Window, it is because the WebDriver hasn't launched during test execution. To fix this issue, please uninstall Jenkins of Windows services, and replace it by a DOS batch file containing the following codes:

cd D:\Tools\Jenkins //path to Jenkins folder
java -jar --webroot=jenkins.war

Code sample courtesy of Sébastien Taniere

See also

Was this page helpful?