# Integrate desktop application test execution on Katalon TestOps

**URL:** <https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406>\
**Category:** Miscellaneous\
**Created:** [April 16, 2025, 10:19am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406 "2025-04-16T10:19:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sontm9\_cert2](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sontm9_cert2/32/30227_2.png) [@sontm9\_cert2](https://forum.katalon.com/u/sontm9_cert2)\
**Post date:** [April 16, 2025, 10:19am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/1 "2025-04-16T10:19:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [April 17, 2025, 2:30am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/2 "2025-04-17T02:30:17Z")

</div>

Hi @sontm9_cert2,

Welcome to our community. To execute desktop app on TestOps, you can follow:

- Build test case on KS
- [Configure TestOps Integration](https://docs.katalon.com/katalon-studio/get-started/workspace-settings/integrate-katalon-platform-with-katalon-studio) & [Test Execution](https://docs.katalon.com/katalon-platform/execute/test-execution-with-testops)
- Use KRE to execute your desktop tests from the [command line](https://docs.katalon.com/katalon-testcloud/web-testing/desktop-browser-testing-with-testcloud#run-tests-on-desktop-browsers-in-katalon-runtime-engine)

Hope this can help. Thank you

---

<div class="post-metadata">

**Author:** ![sontm9\_cert2](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sontm9_cert2/32/30227_2.png) [@sontm9\_cert2](https://forum.katalon.com/u/sontm9_cert2)\
**Post date:** [April 17, 2025, 4:43am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/3 "2025-04-17T04:43:42Z")

</div>

Thanks for you quick response, but my test scripts interact with Desktop app on windows (for example Calculator, NotePad++), not desktop browser.

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [April 17, 2025, 5:54am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/4 "2025-04-17T05:54:11Z")

</div>

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:

1. **Using Katalon Studio** to author desktop tests (via WinAppDriver/Appium for Windows or AppleScript for macOS).
2. **Configuring a self-hosted TestOps Agent** on a machine where the desktop app is installed.
3. **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](https://docs.katalon.com/katalon-studio/docs/windows-testing.html):

```auto
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:

```auto
CustomKeywords.'com.example.mac.Keywords.launchApp'('AppName')  

```

## **2. Set Up a Self-Hosted TestOps Agent**

- **Install the Agent** :
  1. In TestOps, go to **Configurations \> Environments \> Add Environment \> On-Premise**.
  2. Download and install the **TestOps Agent** on the machine where the desktop app resides.  

- **Requirements** :
  - Machine must have the **desktop app installed**.
  - For Windows: Enable **WinAppDriver** (run `WinAppDriver.exe` in background).
  - For macOS: Allow **Accessibility Permissions** for the app.

## **3. Link Tests to TestOps**

- **Upload Tests** :
  1. Upload your Katalon project (with desktop test cases) to a **Git repository**.
  2. Connect the repo to TestOps via **Integrations \> Git**.

- **Create a Test Suite** :  
In TestOps, create a test suite containing your desktop test cases.

## **4. Schedule Execution via TestOps**

- **Create a Schedule** :
  1. Go to **Test Planning \> Schedules \> Create Schedule**.
  2. Select your test suite and the **On-Premise Environment** (with your self-hosted agent).  
TestOps Schedule Setup

- **Run Tests** :  
The agent will execute tests on the desktop app and report results back to TestOps.

## **Troubleshooting Tips**

- **WinAppDriver Issues** :
  - Verify WinAppDriver is running: `http://127.0.0.1:4723/status`.
  - Use `WindowsBuiltinKeywords.refreshDesktop()` to reset the session.

- **Agent Connectivity** :
  - Ensure the agent machine has **outbound internet access** (for TestOps communication).
  - Check agent logs at `%ProgramData%\Katalon_TestOps_Agent\logs`.

- **macOS Permissions** :
  - Grant Terminal/TestOps Agent **Full Disk Access** in **System Preferences \> Security & Privacy**.

## **Limitations**

- **Single-Session Only** : TestOps can’t parallelize desktop tests on the same agent (unless multiple VMs are used).
- **GUI Dependency** : The agent machine must **not lock/sleep** during execution (use `caffeinate` on macOS or `powercfg` on Windows).

By following this approach, you can seamlessly integrate desktop app testing into your TestOps workflow.

---

<div class="post-metadata">

**Author:** ![sontm9\_cert2](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sontm9_cert2/32/30227_2.png) [@sontm9\_cert2](https://forum.katalon.com/u/sontm9_cert2)\
**Post date:** [April 17, 2025, 8:26am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/5 "2025-04-17T08:26:31Z")

</div>

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.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/3/2/32a248f6fc04959efb0e621900727abf917d4d50.png)

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [April 18, 2025, 6:50am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/6 "2025-04-18T06:50:55Z")

</div>

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**

1. **Install Prerequisites** :

- Install [WinAppDriver](https://github.com/Microsoft/WinAppDriver/releases) and start it as a service:

```auto
# 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`).

1. **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**

1. **Write Tests Using Windows Keywords** :

```auto
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'))

```

1. **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**

1. **Create a Generic Test Environment** :

- In TestOps, label your on-premises environment as `Windows-Desktop` (manually tag it for clarity).

1. **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**

1. **Add Required Capabilities** :

- In your Katalon test script, specify WinAppDriver’s endpoint:

```auto
"windows:winAppDriverUrl" -> "http://127.0.0.1:4723"

```

1. **Kill Residual Processes** :

- Use a `@BeforeTestCase` method to ensure no lingering app instances:

```auto
Runtime.getRuntime().exec("taskkill /f /im MyApp.exe")

```

## **Step 5: Run & Debug**

1. **Execute the Schedule** :

- TestOps will trigger the agent to run tests on the Windows machine.

1. **Troubleshoot Failures** :

- Check **Agent Logs** : Located at `C:\ProgramData\Katalon_TestOps_Agent\logs`.
- Verify **WinAppDriver Logs** : Default logs at `C:\Program Files (x86)\Windows Application Driver\Logs`.

## **Workaround for “Unsupported Environment” Issues**

If TestOps blocks execution for non-mobile environments:

1. **Use a Mobile Capability Profile** (hack):

- In Katalon Studio, create a **mobile profile** with dummy values:

```auto
"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**

1. **Run Tests via Command Line on the Agent** :

```auto
# On the Windows agent machine
katalonc -noSplash -runMode=console -projectPath="C:\Tests\Project.prj" -testSuitePath="Test Suites/Windows_Tests" -reportFolder="Reports" -reportFileName="report"

```

1. **Push Results to TestOps** :  
Use the TestOps API to upload results:

```auto
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](https://docs.katalon.com/katalon-analytics/docs/ka-api.html).

By following these steps, you can bypass TestOps’ lack of native Windows app support and execute desktop tests reliably

---

<div class="post-metadata">

**Author:** ![sontm9\_cert2](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sontm9_cert2/32/30227_2.png) [@sontm9\_cert2](https://forum.katalon.com/u/sontm9_cert2)\
**Post date:** [April 18, 2025, 10:27am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/7 "2025-04-18T10:27:34Z")

</div>

@dineshh  
Could you please provide in detail for below steps?

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/6/c/6c0965db41f4f9036eaf117d6c8361021ad5b0ec.png)

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.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/9/9/99240072a389decda3e2df4d9de4107d0d450cbb.png)

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [April 19, 2025, 5:42am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/8 "2025-04-19T05:42:16Z")

</div>

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**

1. **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:

```auto
"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:

```auto
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**

1. **Upload Tests to TestOps** :

- Commit your Katalon project (with the `WinAppDriver_Workaround` profile) to Git.
- Connect the Git repo to TestOps ( **Integrations \> Git** ).

1. **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**

1. **Create a Test Suite** :

- Add your Windows desktop test cases to a test suite.

1. **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**

1. **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**.

1. **Capability Overrides** :

- Ensure your test scripts **do not inherit the dummy profile values**. Explicitly set WinAppDriver capabilities in code.

1. **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:

```auto
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:

```auto
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](https://docs.katalon.com/katalon-analytics/docs/ka-api.html):

```auto
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.

---

<div class="post-metadata">

**Author:** ![sontm9\_cert2](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sontm9_cert2/32/30227_2.png) [@sontm9\_cert2](https://forum.katalon.com/u/sontm9_cert2)\
**Post date:** [April 20, 2025, 9:32am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/9 "2025-04-20T09:32:59Z")

</div>

@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?

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/e/a/ea1bbdc95b918504a2201a266c1d406958ec0004.png)

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [April 21, 2025, 5:21am UTC](https://forum.katalon.com/t/integrate-desktop-application-test-execution-on-katalon-testops/171406/10 "2025-04-21T05:21:03Z")

</div>

![Screenshot 2025-04-21 at 10.46.18](https://europe1.discourse-cdn.com/katalon/original/3X/e/b/eb0fc2d60f023f710df7b6fa48b018d5be959245.png)
