I want to integrate desktop application test execution on Katalon TestOps, but cannot find information related to it.
Is it possible to run desktop application tests from Katalon TestOps?
I want to integrate desktop application test execution on Katalon TestOps, but cannot find information related to it.
Is it possible to run desktop application tests from Katalon TestOps?
Hi @sontm9_cert2,
Welcome to our community. To execute desktop app on TestOps, you can follow:
Hope this can help. Thank you
Thanks for you quick response, but my test scripts interact with Desktop app on windows (for example Calculator, NotePad++), not desktop browser.
Here’s how to execute desktop application tests (Windows/macOS) using Katalon TestOps:
While Katalon TestOps doesn’t natively support desktop app testing out-of-the-box, you can achieve this by:
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
Windows.startApplication('path/to/your/app.exe')
Windows.click(findWindowsObject('Object Repository/Button'))
CustomKeywords.'com.example.mac.Keywords.launchApp'('AppName')
WinAppDriver.exe
in background).http://127.0.0.1:4723/status
.WindowsBuiltinKeywords.refreshDesktop()
to reset the session.%ProgramData%\Katalon_TestOps_Agent\logs
.caffeinate
on macOS or powercfg
on Windows).By following this approach, you can seamlessly integrate desktop app testing into your TestOps workflow.
I have tried to setup Agent on local machine, but Katalon TestOps doesn’t support Window app when select an Agent as a test environment.
To execute Windows desktop application tests via Katalon TestOps, even though there’s no native “Windows app” environment option, you can use a self-hosted TestOps Agent with a workaround. Here’s how:
# Run WinAppDriver in the background (default port 4723)
"C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"
MyApp.exe
).import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
// Launch the Windows app
Windows.startApplication('C:\\Path\\To\\MyApp.exe')
// Interact with elements
Windows.click(findWindowsObject('Object Repository/Button_Submit'))
Windows-Desktop
(manually tag it for clarity)."windows:winAppDriverUrl" -> "http://127.0.0.1:4723"
@BeforeTestCase
method to ensure no lingering app instances:Runtime.getRuntime().exec("taskkill /f /im MyApp.exe")
C:\ProgramData\Katalon_TestOps_Agent\logs
.C:\Program Files (x86)\Windows Application Driver\Logs
.If TestOps blocks execution for non-mobile environments:
"platformName" -> "Windows", // Override later
"appium:app" -> "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" // Example
# On the Windows agent machine
katalonc -noSplash -runMode=console -projectPath="C:\Tests\Project.prj" -testSuitePath="Test Suites/Windows_Tests" -reportFolder="Reports" -reportFileName="report"
curl -X POST "https://analytics.katalon.com/api/v1/results/import" -H "Authorization: Bearer YOUR_API_KEY" -F "file=@C:\Reports\report.html"
By following these steps, you can bypass TestOps’ lack of native Windows app support and execute desktop tests reliably
@dineshh
Could you please provide in detail for below steps?
When scheduling test execution with an agent as test environment, it only supports running with browsers or web service. I am not sure if this is a valid solution.
Katalon TestOps categorizes environments as “Mobile”, “Web”, or “Web Service” – but not “Desktop.” By creating a fake mobile profile, you can bypass TestOps’ environment checks and run desktop tests on a self-hosted Windows agent.
"platformName": "Android", // Dummy value (required by TestOps)
"appium:app": "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" // Example dummy package
WinAppDriver_Workaround
.In your Windows desktop test scripts, ignore the dummy profile and explicitly set the correct WinAppDriver capabilities:
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
// Override capabilities for WinAppDriver
@Keyword
def startDesktopApp() {
Map<String, String> capabilities = new HashMap<>()
capabilities.put("platformName", "Windows") // Real value
capabilities.put("app", "C:\\Path\\To\\YourApp.exe")
capabilities.put("deviceName", "WindowsPC")
capabilities.put("windows:winAppDriverUrl", "http://127.0.0.1:4723")
// Start the Windows app
Windows.startApplicationWithKeywords(capabilities)
}
// In your test case
startDesktopApp()
Windows.click(findWindowsObject('Button_Save'))
WinAppDriver_Workaround
profile) to Git.WinAppDriver_Workaround
profileWinAppDriver_Workaround
profile.http://localhost:4723
).C:\ProgramData\Katalon_TestOps_Agent\logs
for connectivity issues.C:\Program Files (x86)\Windows Application Driver\Logs
.WinAppDriver_Workaround
profile is assigned to the environment.cd "C:\Program Files (x86)\Windows Application Driver"
WinAppDriver.exe
If TestOps still blocks execution, run tests directly on the agent machine via Katalon CLI and push results to TestOps:
katalonc -noSplash -runMode=console -projectPath="C:\Tests\Project.prj" -testSuitePath="Test Suites/Windows_Tests" -reportFolder="Reports" -reportFileName="report"
Then upload results using the TestOps API:
curl -X POST "https://analytics.katalon.com/api/v1/results/import" -H "Authorization: Bearer YOUR_API_KEY" -F "file=@C:\Reports\report.html"
By following these steps, you can effectively run Windows desktop tests on Katalon TestOps despite its lack of native support.
@dineshh
Thank for your response but I cannot find “Under Mobile” in step 1, I am using Katalon Studio 9.7.5. Could you please provide the screenshot for this step?