Running Tests Overview

Learn how to run tests

There are multiple ways to run tests on Testim:
Local runs

Remote Runs

Running a single test through the test screen on Testim Automate UI (web & mobile)

You can run a single test locally or remotely on the Grid using the Testim Automate UI. You can also run the test locally or remotely in Incognito mode.

Running a local web test

To run a web test locally:
In the Editor screen, click the Run test button.

944

Running a local mobile test

To run a mobile test locally:

  1. Click the Run button in the action menu.
1916

📘

If a Target device setting for the test is not present (e.g., when you run the test from Test Library), you will be asked to select a device. Select the relevant physical or virtual device and then click Done. The selected device will be saved as the Target Device for the current session.

The device viewer window opens and runs the test actions. When the test is completed, a pop-up window indicates whether the test was successful.

1905

Running a remote web test

You can run a single test remotely on a grid using the test editor.
To run a web test remotely:

  1. In the Editor screen, click the drop-down menu next to the Run test button.
  2. Click the Run on a grid.
1854

If you want to change the grid settings, click Edit.
For more information on grid management, see Grid management.

Running a single or multiple tests through the Test List on Testim Automate UI (web only)

You can run one or more tests from Testim’s Test List. Tests run in this way will only run locally.
To run a test from the Test List:

  1. On the Test List screen select the test or tests you wish to run. Select multiple tests by holding the Ctrl (windows) or Command (mac) key while left-clicking on the tests.
954

The selected tests are highlighted.

  1. Click the Play button.
512

A confirmation window is shown.

446
  1. Select the appropriate check boxes and click OK.
    A browser opens and runs the test/s. You can view the run status during the run. When the run is completed, the Runs screen is shown with information about the run. For more information, see Execution Runs Screen.
512

Running tests through Scheduler on Testim Automate UI (web only)

You can schedule tests to run on a predefined schedule. In order to schedule a test run, the test must have a Label or be part of a Test Suite.
Tests run in this way will only run remotely on the grid. For more information, see Scheduler.

Running tests through the Suites screen on Testim Automate UI (web only)

Using the Test Suites feature, you have the flexibility to group your tests and manage the order in which they will run. Tests run in this way will only run locally. For more information, see Test suites.

Running tests through the Plans screen on Testim Automate UI (web only)

Using the Test Plans feature, you can run multiple tests, while configuring the environment that on which they will run. Tests in the test plans can run locally and/or remotely through the CLI. For more information, see Test plans.

Running Tests through the CLI (web & mobile)

You can run your tests through the command line interface, and integrate with your CI platform. Testim offers a CLI command generator that creates the basic command based on the selected configuration. The command can be then copied to the CLI and additional flags can be then added. For more information, see Command line interface (CLI).

Running web tests through the CLI

You can run the test locally or remotely through a Grid. If you want to run it through a Grid, you will have to configure the grid in advance by following the instruction in Grid management.

The following grids are available for web testing:

  • Testim cloud grid - Testim can provide you with a private grid. If you don't already have it, contact us to find out which option fits you.
  • Local grids - If you have a selenium grid, we can integrate with it.
  • Third party grids - Testim can integrate with third party grids like Saucelabs and Browserstack.

Running mobile tests through the CLI

You can run the test remotely through a Headspin Grid.
To run a mobile test through the CLI:

  1. If you want to run the through a Grid, you will have to configure the grid in advance by following the instruction in HeadSpin integration.
  2. Go to Settings > CLI tab.
  3. Under Grid, select the desired grid on which to run the test. In this case select the Headspin grid.
    The basic CLI command is displayed at the bottom under Example.
    The basic command includes the following elements:
    --token: the authentication token
    --project: the project ID
    --grid: the name of the grid to run the tests on. For web testing, Selenium grids will be displayed and for mobile testing, Appium grids will be displayed.
  4. Copy the CLI, edit and add parameters according to your needs.
705

You can run a specific test, label, configuration, and other labels, as explained in Command line interface (CLI).

Tests' Timeouts

By default, all tests will timeout after 10 minutes. This setting cannot be overridden when running the test from the Testim editor, whether it is played locally or remotely. However in the following cases, you can set a different timeout setting:

  • When using the Scheduler - as part of the scheduler Advanced Options configuration, it is possible to set the Test timeout (seconds) setting. In any case, the maximal test timeout period is 3 hours. For more information, see Scheduler
  • When running through the CLI - when running the test through the CLI, it is possible to add a --timeout flag that defines a timeout period in milliseconds to abort the test run if a timeout has elapsed. For more information, see Command line interface (CLI).

What’s Next