Execute tests

You can execute a test, stop or interrupt the execution, and restart a test execution at any time. The Single test report (execution report) shows details of all the commands and a video of the test execution.

The following procedure describes steps to run an existing test.

To run a test:

  1. On the top toolbar, click File and select Open.

  2. In the Open Test dialog box, select the test you want to execute and click Open.

  3. On the top toolbar, click the Execute test button .

  4. In the Enter runtime values dialog box, click Select device.

    A DUT variable is essential to execute a test. By default, the DUT variable selects the opened device as its value. You can select another device as a value for the variable. To learn more, see Configure test variables.

    To execute a test on a desktop web device, make sure to select it as a value for the DUT variable. To work with a desktop web device, the Perfecto AI license and Desktop Web license must be enabled on your cloud. For more information, contact Perfecto Support.

    While working with a desktop web device, make sure to select it as a value for the DUT variable.

  5. In the Select device dialog box, select a device and click Select.

  6. Back in the Enter runtime values dialog box, click Run.

    The test execution status is displayed at the top of the test. During the test execution, the command (test step) being executed is highlighted. In a long test, if the execution reaches a command outside of what is visible on the screen, AI Scriptless auto-scrolls to keep the step being executed visible.

    All other actions are disabled during the test execution. The device is blocked for user interactions.

    You can stop the test execution anytime by clicking the Stop test button. Use the Re-run test link to restart the execution.
  7. When the test run is complete, to view a detailed report of the test run, in the information banner above the report, click the View report link. For more information, see Single test report (execution report).

    If the test failed, the banner displays the line numbers where the failure occurred.

  8. (Optional) To clear the status of the test run, click the close button in the banner above the test.

    This option dismisses the banner, the status icons next to each command in the test, and the icon in the test tab.

Run a selected range of steps

This feature is available only when the AI Scriptless engine and test-debugging feature are enabled for your cloud.

To run part of a test:

  1. In the step menu for a top-level step, click Run from step to set the first step in the range.

  2. In the step menu for a top-level step, click Run to step to set the last step in the range. You can set either boundary or both.

  3. Follow steps 3 through 6 in To run a test above to start the manual run. Only steps in the selected range execute. Steps outside the range are greyed out.

To remove the range and run the full test, in the step menu, click Clear all steps.

The range applies to manual runs only. It is temporary and is not saved with the test. It is lost when you close or reload the editor tab. You cannot change the range while a run is in progress.

Only top-level steps can be selected as the start or end step. You cannot select excluded steps or steps inside a condition, loop, or other nested step. If a new selection would put the end before the start, or the start after the end, the new selection replaces the other boundary.