A test plan is a container of tests, which include specific test labels and/or test suites that can be organized to run consecutively. The test plan can include tests/test suites that run before and/or after the list of tests/test suites. The test plan can include settings that override the tests' default settings.
Test plans are great If you need to do:
- Set up your environment before your tests execute.
- Clean up your environment after your tests execute.
- Run your tests on several devices and operating systems.
To create a new test plan:
- Navigate to Test List in the main menu.
- Select Plans from the top navigation.
- Click the New Plan button.
- Enter the Name and Description for your new Test Plan.
- Select the Add Before All checkbox if you want to run a set of tests prior to Test Plan's main test list. Enter the name of one or more Test Suites or Test Labels. Typically this would include setup steps, such as login, etc.
- Select the Add After All checkbox if you want to add "teardown" tests after the test list has run. Enter hte name of one or more Test Suites or Test Labels. It is a best practice to include "teardown" tests in your test plan. These are tests designed to clear the cache, clean up data, log out users, etc. once the tests are complete.
- The tests in "Before all" and "After all" will always run in parallel level
1. Only the "Test List" can run at a higher parallelization level, if it is set in the CLI.
- The tests in Test list WON'T be executed if one of the "before all" tests failed.
- The tests in "Add After All" will always run even if tests in Test list failed.
- In the Where to Run field, select the Mobile Grid you would like to execute your tests on. See Grid Management for more information.
When selecting Override default configurations, only configurations associated with the selected grid will be displayed.
- In the What to run on section, select the Override default configurations checkbox to override the default configurations of the tests with the selected configurations. Only configurations that are supported by the selected grid will be displayed. Choose from your list of configurations or create a new one. See Configurations Library for more information. Selecting multiple configurations will result in multiple executions, respectively. Each configuration will trigger an execution that will run a on a single device that is automatically selected from the grid.
- In the What to run on section, select the Override Application checkbox to override the default mobile app that was configured in the tests by a different application for your test plan.
- Click the Create button to create your test plan.
In order to execute a test plan, you'll need to specify the plan name in your CLI command like this:
--test-plan "Test Plan Demo"
If you add a different grid name to the CLI, it overrides the grid defined in the plan.
If you have CLI steps in your tests make sure the CLI is running before executing.
When you use a plan you can share parameters between tests e.g. create an account in the setup and use those credentials throughout all tests. See Parameters for more information.
Updated 7 months ago