This tutorial shows you how to integrate Katalon with Jenkins on Windows and macOS via the Katalon plugin for Jenkins.
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.
Execute Katalon Studio tests in Jenkins with the Katalon plugin
Install the Katalon plugin
Install the Katalon plugin. Go to Manage Jenkins > Manage Plugins > Available tab and search for the Katalon plugin.
Select the plugin and click Install without restart.
Upload Katalon projects on Jenkins
After installing the Katalon plugin, you can now start the Katalon Studio test in Jenkins.
In the Jenkins Dashboard, go to New Item and create a Freestyle project.
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.
Build your project
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.
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: . For example:
<KRE stored folder>-<KRE pre-installed-version>
Input your command in the Command arguments box, for example:
-browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/TS_RegressionTest" -apikey=<YOUR_API_KEY>Warning:
When you use the Katalon plugin, you do not need to mention
- From version 7.7.0 onwards, 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:
- 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.
After you are done with the configuration, click Save, then click Build Now to run the project.
To view the console log, click on your current build on Jenkins and select 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