Getting Started with Windows application testing

This document will help you get up and running with RIATest, a powerful test automation tool for Windows Desktop and Windows 8 Store (aka 'Metro') applications.

Before you begin

System Requirements

In order to use RIATest to automate testing of your Web application you need:

Creating a RIATest project

First create a RIATest project.

  1. Run RIATest IDE and select File, New Project.
    "New Project" window appears:
    New Project Wizard
  2. Select project type "Windows application testing", specify a project name and a folder to store the project:
  3. In Application EXE specify the location of your application executable file.
  4. Click OK to close the window and create the project.
  5. Select Run, Launch Application.
    Your application will be launched. The RIATest IDE title bar displays "Launched".
  6. Switch back to RIATest IDE and verify that the message log shows the following lines:
    Launching "C:\Program Files (x86)\calc.exe"
    Application launched (process id=2684).

Recording scripts

To record a script

  1. In RIATest IDE, select Project, Add New Script. Enter a name and click Save.
  2. Select Run, Start Recording.
    RIATest IDE title now show "Recording".
  3. In your application window, perform the test actions. If required, generate checkpoints (see below).
    The RIATest IDE records actions as statements in the Test Script window.
  4. To stop recording, select Run, Stop Recording.

Generating checkpoints

While recording a script, you can generate checkpoints. A checkpoint stores the values of the selected component. During playback, RIATest IDE compares the current values with those stored in the checkpoint and reports accordingly (see below).

You can hand-code checkpoints, but it is simpler to generate them during the recording process.

To generate a checkpoint based on a selection of the component's properties

  1. In RIATest Object Inspector window, click Inspect then hover the mouse over a component.
    A blue frame highlights the component. Its class, name and all available properties are displayed.
  2. Click on your chosen component.
  3. In RIATest Object Inspector window, click Verify button and select Verifty Properties menu item.
    The selected component's properties are displayed:

    Verify Properties
  4. Use the checkboxes to include properties in the checkpoint.
  5. Click OK.
    The resulting checkpoint stores the values of the selected properties, only.

Editing your recording

You can stop and restart a recording at any time. This enables you to correct any mistakes.

To delete mistakes

  1. If you have not already done so, in RIATest IDE, select Run, Stop Recording to stop the recording.
  2. Select the unwanted actions and delete them.
  3. Select Run, Start Recording.

Inspecting the components

RIATest provides an easy way to browse GUI elements during recording.

  1. In RIATest IDE, click Inspect button in the Object Inspector window then hover the mouse over a component in your application window.
    A green frame highlights the component
  2. Click anywhere to exit "inspect mode". The Object Inspector will show the selected component in the tree and all available properties of the component will be displayed:


Playing back test scripts

When you play back a test script, the Message Log reports the results.

  • Successfully passed checkpoints generate green messages.
  • Failed actions and checkpoints generate red messages.

The Message Log also shows the number of scripts that ran without any errors, and the number of scripts that encountered problems.

To run a test script

  1. In RIATest IDE, select File, Open Project and select your project.
  2. Select Run, Run Without Debugging.
    Your application launches. RIATest IDE replays the recorded actions and checkpoints, recording the results in the Message Log.

After playback finishes, your application terminates.


Debugging tests

If you encounter unexpected errors during playback, you can debug your scripts.

To start a debugging session

  1. In RIATest IDE, select Run, Run Tests.
    Scripts run as usual. If any problems are encountered (such as checkpoint or action failure), the script suspends with the problem line highlighted.
  2. Do one or more of the following:
    • Inspect the most recent message in Message Log. This usually explains the problem (e.g. Expected vs. Actual values will be shown for a failed checkpoint).
    • Hover the mouse over variable names to examine their values.
    • Switch to your application and inspect components and their properties.

Writing test scripts manually

Sometimes you will need to perform sophisticated tests such as repeating the same sequence of user actions, or conditionally executing actions depending on the state of your application. For these, recording a script is not suitable - you need to write one manually.

RIATest tool uses RIAScript, a language similar to JavaScript, for writing test scripts. The basic language elements of RIAScript are almost exactly the same as in JavaScript. You can declare and assign values to variables, make function calls, and write conditional and loop statements. For more details see RIAScript Reference Guide.


Please see the current list of known lissues. For other issues please contact RIATest helpdesk.


You are here RIATest Documentation Getting Started Testing Windows applications