Turn your manual testers into automation experts! Request a DemoStart testRigor Free

How to do desktop testing using testRigor?

With testRigor, you can test more than just web applications on your desktop. This tool supports testing native desktop applications as well through remote desktop connections.

Let’s take a look at how this can be done with an example.

Pre-requisites to writing the test case

Before we jump into the test case creation process, we need to set up a reliable connection between the remote desktop and testRigor.

1. Enable Remote Desktop (RDP) for Windows

testRigor supports remote desktop testing for Windows. The first step to achieve this will be to enable the remote desktop setting on the computer. For that, head to Windows Settings > System > Remote Desktop and switch Enable Remote Desktop to On.

2. Create a test suite in testRigor

Step 1: Log in to your testRigor app with your credentials.

Step 2: Set up the test suite for the website testing by providing the information below:

  • Test Suite Name: Provide a relevant and self-explanatory name.
  • Type of testing: Select from the following options: Desktop Web Testing, Mobile Web Testing, Native and Hybrid Mobile, and Windows Remote Desktop based on your test requirements. We will use Windows Remote Desktop as the testing type for this case.
  • Address: Address refers to the IPv4 address. To set up the connection with testRigor, click the Windows (or Start) > Settings > Network & Internet > Hardware Properties. The computer’s IPv4 address should be visible there.
  • Username and Password: You need to provide the remote device/system’s username and password so that testRigor can log in and move on with the testing.

This is how the test suite creation screen will look like.

Step 3: Click on Create Test Suite.

Step 4: To create a new custom test case yourself, click Add Custom Test Case.

3. Setup Microsoft Windows Application Driver

Microsoft Windows Application Driver (WinAppDriver) is an open-source framework designed for automated testing of desktop applications on Windows 10 machines. You need this application to set up the remote testing environment. You can do it the following way:

Step 1: Download the latest stable release of Windows Application Driver installer from the official homepage https://github.com/microsoft/WinAppDriver/releases/ and install it. You will need administrator rights for this.

Step 2: Enable Developer Mode in Windows settings. To do this, head to Windows Settings > Update & Security > For Developers and enable Developer mode.

Step 3: Run WinAppDriver.exe from the installation directory (e.g., C:\Program Files\Windows Application Driver\). You will need administrator rights to run it if you want to change the listening address/port ( by default).

Step 4: Specify a URL of the running WinAppDriver in the testRigor test suite settings. To do this, head to Settings > Remote Desktop > Windows Application Driver URL. For configured tunneling, it will look like http://tunnel.testrigor.com:XXXX, where XXXX is the port number from the tunneling configuration for the WinAppDriver.

Note: If the computer is behind a VPN or firewall, secure access from the testRigor servers to the local Microsoft Windows Application Driver (WinAppDriver) will need to be granted via tunneling. You can do that by referring to this document.

This video explains the above steps for desktop application testing very well.

Test Case: Testing a CRM application remotely on a Windows desktop

In the following test case, we will test a native CRM application on a Windows desktop.

Let’s take a look at every step that will be part of the testRigor test case.

Test Steps

Step 1: Come to the Test Cases section, provide the test case Description, and add the test steps. We will add test steps in the test case editor screen.

Step 2: As we have set up RDP and ensured that it is securely connected with testRigor, we can proceed with our test case writing.

Step 3: Before we move on to our actual test case, we will perform a clean-up to close windows and delete specific files. For this, we are using a reusable rule. Reusable rules are singular English statements representing a group of plain English commands. They can be used across test cases to perform a repetitive function. In our case, the reusable rule we are using is
cleanup app state before test

To create a reusable rule, go to Reusable Rules in the left panel. Provide details and save the rule. The above rule looks like this.

Let’s break down the rule.

  1. wait 5 sec

    Simple wait command.

  2. type win+r

    Shortcut to open the ‘Run’ window in Windows.

  3. copy to clipboard from "kill app"
    ‘Kill app’ has a value of ‘taskkill /IM “CRM*”‘ which is saved in the Test Data section. The command terminates processes whose image name starts with “CRM”.
  4. paste from clipboard
    The value of the ‘kill app’ variable is pasted into the text input field of the ‘Run’ window.
  5. type tab

    Simple command to enter ‘tab’ in the text input field.

  6. type enter

    Command to enter ‘enter’ in the text input field. This also ensures that the ‘kill app’ command works, thus clearing the system.

  7. type win+r

    Shortcut to open the ‘Run’ window in Windows.

  8. enter "cmd /C del /q /f %USERPROFILE%\Documents\w10crmdemo.sdb"

    This, again, is a Windows command to delete a file named “w10crmdemo.sdb” located within the user’s Documents folder. We are entering this command into the text input field of the ‘Run’ window.

  9. type tab

    Simple command to enter ‘tab’ in the text input field.

  10. type enter

    This command is to enter ‘enter’ in the text input field, which also executes the command.

  11. hover over "Edge"

    Command to bring the mouse cursor over the Edge browser icon present in the taskbar.

Step 4: After the clean-up operation is complete, we will start with our actual test case. First, we open the CRM application on the desktop.

double click "CRM"

Step 5: Now click on the ‘Accounts’ tab.

click "Accounts"

Step 6: Click on ‘Leads’.

click "Leads"

Step 7: Now click on the ‘Users’ tab.

click "Users"

Step 8: Let’s create a new user. For that, click on ‘Create’ first.

click "Create" using OCR only

Step 9: Type in the name of the user and save it.

type "john"
click "OK"

Step 10: The Users dashboard will show two users now: CRMUser, which was present right from the start, and John, the new user we just created. Using testRigor’s special commands to interact with the keyboard, we will click on CRMUser using the ‘arrow down’ key input.

click "CRMUser" using OCRtype arrow down

Step 11: We will switch tabs within the CRM application from ‘Users’ to ‘Leads’.

click "Leads"

Step 12: Finally, we will close the CRM application using a keyboard shortcut.

type alt+f4

Complete Test Case

Here’s what the full test case will look like in testRigor.
cleanup app state before test

double click "CRM"
click "Accounts"
click "Leads"
click "Users"
click "Create" using OCR only
type "john"
click "OK"
click "CRMUser" using OCRtype arrow down
click "Leads"

//close app
type alt+f4

Viewing Test Results

Once the test is executed, you can view the execution details, such as execution status, time spent in execution, screenshots, error messages, logs, video recordings of the test execution, etc. In case of any failure, there are logs and error text that are available easily in a few clicks.

You can also download the complete execution with steps and screenshots in PDF or Word format through the View Execution option.

testRigor’s Capabilities

The above example shows how powerful a tool testRigor is for end-to-end testing across various platforms, including native apps meant for desktops. You can do a lot more with testRigor.

  • Reusable Rules (Subroutines): We saw a glimpse of this feature in the above test case. You can easily create functions for the test steps that you use repeatedly. You can use the Reusable Rules to create such functions and call them in test cases by simply writing their names. See the example of Reusable Rules.
  • Global Variables and Data Sets: You can import data from external files or create your own global variables and data sets in testRigor to use them in data-driven testing.
  • 2FA, QR Code, and Captcha Resolution: testRigor efficiently manages the 2FA, QR Code, and Captcha resolution through its simple English commands.
  • Email, Phone Call, and SMS Testing: Use simple English commands to test the email, phone calls, and SMS. These commands help validate 2FA scenarios, with OTPs and authentication codes being sent via email, phone calls, or via phone text.
  • File Upload/ Download Testing: Execute the test steps involving file download or file upload without the requirement of any third-party software. You can also validate the contents of the files using testRigor’s simple English commands.
  • Database Testing: Execute database queries and validate the results fetched.

testRigor’s documentation library has commands specific to various platforms like desktops, examples of which you can see in the form of keyboard shortcuts in the above test case and mobile devices.

Additional Resources

Join the next wave of functional testing now.
A testRigor specialist will walk you through our platform with a custom demo.
Related Articles

How to execute test cases in parallel in testRigor?

Parallel execution plays a significant role in End-to-End (E2E) testing for several reasons, mainly time constraints and thorough ...

How to reference elements by UI position using testRigor?

When referring to an element in the DOM, testRigor never relies on unstable XPaths, and it uses testRigor locators instead. ...

How to test QR codes using testRigor?

QR codes have become a game-changer for software applications. Users can access websites, download content, or even make secure ...