Here’s how to execute desktop application tests (Windows/macOS) using Katalon TestOps:
Yes, It’s Possible!
While Katalon TestOps doesn’t natively support desktop app testing out-of-the-box, you can achieve this by:
Using Katalon Studio to author desktop tests (via WinAppDriver/Appium for Windows or AppleScript for macOS).
Configuring a self-hosted TestOps Agent on a machine where the desktop app is installed.
Orchestrating executions via TestOps schedules.
Step-by-Step Guide
1. Author Desktop Tests in Katalon Studio
For Windows Apps:
Use Windows Application Driver (WinAppDriver) with Katalon’s Windows keyword library:
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
Windows.startApplication('path/to/your/app.exe')
Windows.click(findWindowsObject('Object Repository/Button'))
For macOS Apps:
Use Appium/AppleScript with custom keywords:
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:
Step 1: Prepare the Windows Machine & TestOps Agent
# Run WinAppDriver in the background (default port 4723)
"C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"
Install the desktop application you want to test (e.g., MyApp.exe).
Install TestOps Agent:
In TestOps, create an On-Premises Environment:
Go to Configurations > Environments > Add Environment > On-Premise.
Download the agent and install it on the Windows machine.
Ensure the agent runs with administrator privileges (required for WinAppDriver interactions).
Step 2: Configure Tests for Windows Desktop in Katalon Studio
Write Tests Using Windows Keywords:
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'))
Commit Tests to Git:
Upload your Katalon project (with Windows test cases) to a Git repository linked to TestOps.
Step 3: Set Up Execution in TestOps
Create a Generic Test Environment:
In TestOps, label your on-premises environment as Windows-Desktop (manually tag it for clarity).
Schedule a Test Run:
Go to Test Planning > Schedules > Create Schedule.
Select your test suite and choose the On-Premises Environment (your Windows machine’s agent).
Add a Tag Filter to target Windows-specific tests (optional).
Step 4: Handle Dependencies in the Agent Machine
Add Required Capabilities:
In your Katalon test script, specify WinAppDriver’s endpoint:
Workaround for “Unsupported Environment” Issues
If TestOps blocks execution for non-mobile environments:
Use a Mobile Capability Profile (hack):
In Katalon Studio, create a mobile profile with dummy values:
"platformName" -> "Windows", // Override later
"appium:app" -> "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" // Example
In TestOps, map this profile to your on-premises environment.
Alternative: Use CLI with Custom Scripts
Run Tests via Command Line on the Agent:
# On the Windows agent machine
katalonc -noSplash -runMode=console -projectPath="C:\Tests\Project.prj" -testSuitePath="Test Suites/Windows_Tests" -reportFolder="Reports" -reportFileName="report"
Push Results to TestOps:
Use the TestOps API to upload results:
curl -X POST "https://analytics.katalon.com/api/v1/results/import" -H "Authorization: Bearer YOUR_API_KEY" -F "file=@C:\Reports\report.html"
Final Notes
Parallel Execution: Use multiple agents on different Windows machines (each with WinAppDriver on unique ports).
CI/CD Integration: Trigger TestOps schedules via Jenkins/GitHub Actions using the TestOps API.
By following these steps, you can bypass TestOps’ lack of native Windows app support and execute desktop tests reliably
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.
Step 1: Create a Mobile Capability Profile in Katalon Studio
Navigate to Profile Settings:
In Katalon Studio, go to Profiles > Default (or create a new profile).
Under Mobile, add dummy capabilities to trick TestOps into accepting the environment:
"platformName": "Android", // Dummy value (required by TestOps)
"appium:app": "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" // Example dummy package
Save the profile as WinAppDriver_Workaround.
Step 2: Override Capabilities in Test Scripts
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'))
Step 3: Link the Profile to a TestOps Environment
Upload Tests to TestOps:
Commit your Katalon project (with the WinAppDriver_Workaround profile) to Git.
Connect the Git repo to TestOps (Integrations > Git).
Map the Profile to Your On-Premises Agent:
In TestOps, go to Configurations > Environments.
Select your on-premises (Windows) environment and assign the WinAppDriver_Workaround profile
Step 4: Schedule Execution in TestOps
Create a Test Suite:
Add your Windows desktop test cases to a test suite.
Schedule a Run:
Go to Test Planning > Schedules > Create Schedule.
Select your test suite and the On-Premises Environment mapped to the WinAppDriver_Workaround profile.
TestOps will treat this as a “mobile” test but execute it on your Windows agent.
How It Works
TestOps Validation: TestOps checks if the selected environment has a valid mobile profile (which it does, thanks to the dummy values).
Runtime Execution: During test execution, your scripts override the dummy profile with WinAppDriver settings, allowing Windows app interaction.
Critical Checks for Success
Agent Machine Configuration:
WinAppDriver must be running (http://localhost:4723).
The desktop app must be installed on the agent machine.
The TestOps Agent service should run with Admin privileges.
Capability Overrides:
Ensure your test scripts do not inherit the dummy profile values. Explicitly set WinAppDriver capabilities in code.
Execution Logs:
Check Agent Logs at C:\ProgramData\Katalon_TestOps_Agent\logs for connectivity issues.
Monitor WinAppDriver Logs at C:\Program Files (x86)\Windows Application Driver\Logs.
Troubleshooting
Error: “No mobile device connected”:
Ensure the WinAppDriver_Workaround profile is assigned to the environment.
TestOps validates profiles during scheduling but doesn’t enforce device connectivity for on-premises agents.
WinAppDriver Fails to Start:
Run WinAppDriver manually before tests:
cd "C:\Program Files (x86)\Windows Application Driver"
WinAppDriver.exe
Alternative Approach: CLI Execution
If TestOps still blocks execution, run tests directly on the agent machine via Katalon CLI and push results to TestOps:
@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?