Background: On the current document of Katalon, they support Ubuntu 16.04 and 18.04 on Azure DevOps. However, those images are no longer supported by Microsoft.
Problem: When running with Ubuntu 20.04 or 22.04, Some of us are facing the issue that Katalon Azure DevOps plugin cannot run or getting hang, then get some messages like: ##[error]The operation was canceled.
Solution: As we know, Katalon Runtime Engine requires OpenJDK 8 for v7, v8 and OpenJDK 17 for v9. On Azure DevOps Microsoft-hosted machine, Microsoft set JDK 11 as the default Java version so we need to change the default Java version to 8 for KRE v7, v8 and 17 for KRE v9 onward.
Sample script for KRE v7, v8:
trigger:
- master
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: katalonTask@1
inputs:
version: '8.6.8'
executeArgs: '-testSuitePath="Test Suites/New Test Suite" -browserType="Chrome" -apiKey=$(katalon_api_key) --config -webui.autoUpdateDrivers=true'
xvfbConfiguration: '-s "-screen 0 1024x768x24"'
env:
JAVA_HOME: $(JAVA_HOME_8_X64)
PATH: $(JAVA_HOME_8_X64)/bin:$(PATH)
Sample script for KRE v9 onward:
trigger:
- master
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: katalonTask@1
inputs:
version: '9.0.0'
executeArgs: '-testSuitePath="Test Suites/New Test Suite" -browserType="Chrome" -apiKey=$(katalon_api_key) --config -webui.autoUpdateDrivers=true'
xvfbConfiguration: '-s "-screen 0 1024x768x24"'
env:
JAVA_HOME: $(JAVA_HOME_17_X64)
PATH: $(JAVA_HOME_17_X64)/bin:$(PATH)