This step-by-step guide shows you how to install and run Katalon with Azure DevOps for Web UI testing. For an example use of Azure DevOps, see Sample pipeline.
Install Azure DevOps Extension
Go to the Visual Studio Market Place, download and install the free extension of Katalon for Azure DevOps.
Configure the Execute Katalon Studio Tests
- Import a Repository by cloning a Sample pipeline from Github:
- Create New Pipeline > Select Azure Repos Git > Select a suggested repository:
- It will automatically show the yml file, by default, it is a configuration for Windows:
To run UI tests on Azure Pipelines, you might need to adjust the screen resolution (See Microsoft documentation on Setting screen resolution). You can also install the Screen Resolution Utility extension from the Visual Studio Marketplace.
You can refer to the below script for Linux:
- task: katalonTask@1
executeArgs: '-testSuitePath="Test Suites/New Test Suite" -browserType="Chrome" -apiKey=$(katalon_api_key) --config -webui.autoUpdateDrivers=true'
xvfbConfiguration: '-a -n 0 -s "-screen 0 1024x768x24"'
- task: PublishPipelineArtifact@0
artifactName: 'JUnit Report'
- In case you want to use the Azure DevOps Extension from Assistant Task instead of sample scripts, here's my example:
Once you have installed the extension, you need to configure the Execute Katalon Studio Tests task to complete the integration.
In Azure DevOps, to find Execute Katalon Studio Tests, open Azure DevOps. Then go to the Search box or the Task category.
- For the Download Katalon Studio version field, you simply input the desired version such as 8.0.5, 8.1.0, etc then it will download the KRE package automatically.
- Enter the Command Arguments directly in the text area or generate the arguments from Katalon Studio. Please leave out any irrelevant argument such as
-runmode. See Command Arguments in Common Configuration for more details.
Leave the X11 DISPLAY field blank.
Configure Xvfb-run following Ubuntu Manuals on Xenial xvfb-run. The function still works if you only change the resolution to 1024x768x24 and leave other options as-is.
- After Adding the inputs into the yml configuration, click Save and Run button to execute the pipeline.