Create embedded tests
You can embed any test in another test. Such tests are called embedded tests. This way, you can reuse certain test steps in multiple tests, and when you need to make changes, it's sufficient to update the embedded test, and the changes will be available everywhere that test is used.
The Embeddable Tests sidebar displays all tests available in the repository.
You can embed a test from the Embeddable Tests sidebar to an existing test in the test editor.
A test can include up to three embedded tests.
The search field provides a way to find a specific test.
You can use the Collapse All option to collapse all folders.
Watch this short video to see how to work with embedded tests. Detailed steps follow.
You can add or embed a test to an existing test.
-
In the test editor, open a test into which you want to embed another test.
-
On the Embeddable Tests sidebar, double-click or drag the test to be embedded to the desired location in the test that is opened in the test editor.
You can view the content of an embedded test that is collapsed by expanding it. The name of the embedded test is visible in the test editor and displays an expand button next to it.
-
In the test editor, click the expand button next to the embedded test.
In a test, you can view the source location of an embedded test.
-
In the test editor, hover over the embedded test to view a tooltip with the name of the embedded test and its location.
You can move an embedded test to some other location within a test.
-
In the test editor, drag the embedded test to the required location.
To be able to run the test, you must provide values for all required parameters.
Scriptless Mobile indicates of the status of the runtime parameters of an embedded test.
-
An error icon appears if there are no or some mandatory runtime parameters.
-
An orange icon appears if the test has default parameters.
You can keep the default values if available or add specific values as per your requirement.
-
In the test editor, double-click the embedded test.
-
In the command dialog box, add or select values for the parameters.
-
(Optional) Select the test execution mode as per your requirements.
An execution mode is a way to run the test.
When you execute a test (parent) that includes an embedded test (child), the system does not show the execution status of the individual steps in the embedded test.
You can run a test that includes an embedded test in two ways:
-
Embedded (default) - In this mode, the child test runs as part of the parent test, and the parent waits for the child to execute before continuing. Scriptless Mobile generates a parent test report that includes details of the execution status for the embedded test.
-
Async - In this mode, the child test runs as a part of the parent test, but the parent does not wait or know the status of the child's execution before continuing. Scriptless Mobile generates an individual report that includes details of the execution status for the embedded test. The parent test report contains a link to the embedded test report.
Restriction: Sync mode of execution is discontinued and is only available for tests created with the Perfecto desktop app. -
-
Click APPLY.
To edit an embedded test, you must open it individually in the test editor.
-
On the top toolbar, click the File icon and select Open.
-
In the Open Test dialog box, navigate to the desired test location and select the test.
-
Click OPEN.
Before running an embedded test, make sure that you have selected the execution mode as per your requirement.
-
Navigate to the required test tab.
-
On the top toolbar, click Run test.
-
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.
-
In the Select device dialog box, select a device and click SELECT.
-
Back in the Enter runtime values dialog box, click RUN
Select the View report link to view a detailed report of the execution. For more information, see Single test report (execution report).
-