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:
-
On the top toolbar, click File
and select Open. -
In the Open Test dialog box, select the test you want to execute and click Open.
-
On the top toolbar, click the Execute test button
. -
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.
-
In the Select device dialog box, select a device and click Select.
-
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.
While a test is running, editing actions are disabled, and the device is blocked for user interactions. You can still collapse or expand the Left sidebar; all other sidebar controls are unavailable until the test run completes. For details, see AI Scriptless interface.
You can stop the test execution anytime by clicking the Stop test button. Use the Re-run test link to restart the execution. -
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.
-
(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.
Pause and resume a test
You can pause a test while it is running. When you pause a test, the current step completes before the test pauses. To pause a running test, select Pause
in the execution toolbar. While the test is pausing, the status bar shows Test pausing, the Pause button is unavailable, and you cannot close the test tab.
To continue, select Resume
. To end the test, select Stop.he Stop button appears grey but remains available.
Pausing takes effect between steps, not during a step. An embedded script running asynchronously continues while the parent test is paused. You cannot pause it from the parent test, and the editor does not show which step will run next inside the embedded script.
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 select a range, use the step menu on a top-level step or a step inside a Loop or Group:
-
Select Run from step to set the first step.
-
Select Run to step to set the last step. Set either boundary or both.
-
Follow steps 3 through 6 in To run a test above to start the manual run.
Only steps in the range run while steps outside the range are inactive. Nested steps show range markers. On the last row of a block, Run from is green and Run to is red.
If the first step is inside a Loop or Group, that container runs once without iterating. A Loop or Group that starts inside the range runs normally.
To run the full test, select Clear all steps from a step menu. Ranges apply only to manual runs, are not saved. Ranges are lost when you close or reload the editor tab. You cannot change a range during a run. Moving a boundary step or wrapping it in a Loop or Group keeps it as the boundary.
Only top-level steps and steps inside a Loop or Group can be boundaries. Excluded steps, steps inside a condition, and steps inside other nested step types cannot be selected. If a new selection puts the start after the end or the end before the start, it replaces the other boundary.