Prerequisites
Before running the tests, ensure you have performed the following steps:- If you haven’t already, signup for a Free Trial on the TestDriver website
- Run the
init
command to set up the TestDriver configuration using the API key you got when you signed up for the trial:
Now you are ready to run the tests!
Sample test steps
- Launch the application: Use the
exec
command to launch the application. You can specify the path to the executable file and any command-line arguments needed to start the application. - Wait for the application to load: Use the
wait-for-text
command to wait for a specific text or element to appear in the application window. This ensures that the application is fully loaded before proceeding with the test. - Interact with the application: Use the
focus-application
command to bring the application window to the foreground. Then, use thehover-image
command to interact with specific elements in the application, such as buttons or text fields. - Perform actions: Use the
hover-image
command to click on buttons or enter text in input fields. You can also use thewait-for-text
command to verify that the expected output appears after performing an action. - Verify results: Use the
assert
command to check if the expected result matches the actual output. This step is crucial for validating the functionality of the application.
Supported desktop applications
TestDriver supports a wide range of desktop applications, including:- Electron apps
- Java apps
- .NET apps
- Native Windows applications
- Native Mac applications
- Native Linux applications
- Any other desktop application that can be run on Windows, Mac, or Linux
Installation
To use TestDriver with desktop applications, no special setup is needed. Simply run the local agent to interact with applications on your local machine, or add instructions toprovision.yaml
to tell the runner to launch or install the application. Here is an example that performs a calculation on a calculator app:
testdriver/lifecycle/provision.yaml
calculator.yaml
file might look like this:
calculator.yaml