Native Desktop App Testing Overview

Native Desktop App Testing Overview

testRigor supports the testing of native Windows desktop applications. To utilize this feature, users should choose “Windows Remote Desktop” in the “Type of testing” field when adding a new test suite and then set up access appropriately.

Desktop Testing Behavior

testRigor uses the applications installed on your computer. If your test moves between a website and a desktop application, testRigor will use your computer’s browser as well. For example, a test can open a browser, check an email for a Zoom meeting link, and click the link to launch the Zoom desktop application.

Desktop testing does not automatically clean up after a test finishes. If you need to close applications, delete files, or reset anything, make sure to include those steps in your test case.

Tunneling Requirements

Since almost all computers are behind a firewall, users typically need to contact a testRigor representative to have a custom tunneling port allocated. This allows testRigor to connect to their Windows machine via RDP, even when the computer is protected by a firewall. Please refer to the setup instructions at the bottom of the page.

Interacting with applications

We can open multiple applications and interact with elements we see on our screen, just like how we do in standard web testing:

click "zoom"
click "settings"
click "close"
click "notepad"
type "testRigor rocks!"

Using keyboard shortcuts

In native desktop testing, we can use keyboard shortcuts to interact with Windows and launch applications without relying on desktop icons or navigating through menus.

To ensure a consistent starting point, we can use a few tricks. First, we wait 10 seconds for the RDP connection to finish loading. Then, we use type win+d to minimize any open windows and show the desktop, followed by type win+r to launch applications directly, even if they aren’t visible on the desktop or taskbar.

For example, the following test case opens the Windows Calculator application:

wait 10 seconds  // Allow time for the RDP session to fully load
type win+d       // Show the desktop only
type win+r       // Open the Run dialog
enter "calc"     // Enter the Calculator command
type tab         // Move to the next element which is "OK"
type enter       // Launch Calculator

Best Practices for Reliable Desktop Testing

Ideally, desktop tests should run on a dedicated Windows machine that isn’t used for other activities. This helps maintain a consistent testing environment and prevents other users or applications from interfering with test execution. However, when a dedicated machine isn’t available, using keyboard shortcuts to establish a predictable starting point can make your tests more reliable.

Using AI and Validations

We can also use AI-powered actions and validations when testing native desktop applications. AI allows us to interact with elements without relying on exact coordinates or technical identifiers, making tests easier to create and maintain.

We can then use validations to confirm that the application behaves as expected, whether that’s checking that a file was saved successfully, verifying that certain text appears on the screen, or confirming that an action produced the correct result

type win+d
click "notepad"
type "I love testRigor!!!!!"
click "File" using AI
click "Save As" using AI
wait 3 sec up to 5 times until page contains "Save" to the left of "Cancel" using AI

enter delete
type "this_is_my_file"
click "Save" to the left of "Cancel" using AI
check that page contains "this_is_my_file"

Connecting to your Windows machine

Here’s the video that details the steps on how to set up Windows for desktop app testing from testRigor cloud servers. The video outlines the following steps:

  1. Enable Remote Desktop Protocol (RDP) for Windows
    • Allows testRigor to remotely connect to and control your Windows computer.
    • Settings > System > Remote Desktop
  2. Enable Developer Mode for Windows
    • Allows Windows to support development and testing tools such as WinAppDriver.
    • Settings > System > Advanced > For developers
  3. Install WinAppDriver
    • Enables testRigor to identify and interact with elements in native Windows applications using attributes such as AutomationId and Name .
    • Both 1.2.99 and v1.2.1 will work: download
    • Default installation path: C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe
  4. Download testRigor’s tunneling client (trtc)
    • Establishes a secure connection between your computer and testRigor, even when your computer is behind a firewall.
    • Windows: x86_64: download
    • Linux, x86_64: download
    • Linux, arm64/AArch64: download
    • macOS, Intel x86_64: download
    • macOS, Apple Silicon (M1-M4) arm64: download
  5. Create test suite in testRigor
    • Select Windows Remote Desktop as the testing type and configure your connection settings.
    • Configure Remote Desktop access
      • Address: 127.0.0.1:3389 (local RDP address; use the appropriate address or tunnel endpoint for your setup)
      • Username: Your Windows account username.
      • Password: The password used to sign in to your Windows account (not your PIN).
      • Windows Application Driver URL: The address where WinAppDriver is running, typically http://127.0.0.1:4723 when accessed locally.
    • Configure HTTP/HTTPS proxy
      • XXXXX is the port allocated by a testRigor representative.
      • Proxy Address: tunnel.testrigor.com:XXXXX
      • Proxy Username (optional)
      • Proxy Password (optional)
  6. Launch trtc.exe and WinAppDriver.exe in separate terminal windows
    • Locate each executable and double-click it to launch.
    • Keep both running throughout test execution.
  7. Run your desktop tests
    • When testing on your own computer, the active Windows session may become unavailable for local use while testRigor connects remotely via RDP.

Test your knowledge

Enable Bluetooth
Enable Remote Assistance
Enable Remote Desktop Protocol (RDP)
Enable VPN
testRigor’s built-in browser and application simulator
The browser and application installed on the user’s machine
The browser installed on testRigor’s server
Only the user’s default email client