Test plans
Test plan is a set of test cases aggregated using some pattern; a pattern could be a tag of a test case, belonging of a test to some feature, test suite or microservice.
Test plan allows storing the rules for grouping of tests, update the grouping, start launches for test cases combined into a test plan.
Creating a test plan
There are several ways to create a test plan, you can use the list of all test cases from Test cases section or start creating a test plan from Test Plans section.
You can tick test cases one by one, but this is quite tedious task, it's better if your tests are tagged; this will save you a considerable amount of time.
Creating a test plan using test cases section
We'll use creation of a test plan to run smoke tests as an example. All the tests we use for smoke tests have the tag smoke assigned to them.
- Jump to the Test cases section.
- Enable filtering.
- In the filters panel > Tag provide the tag of the tests (smoke in our example).
- Select all the test passed through the filter.
- Click bulk actions button
- Select Create Test plan
Name the test plan (Smoke tests will comply with our target).
Creating a test plan from Test plans section
- Jump to Test plans section
- Click +New test plan button in top right corner.
- Name your test plan
- Select the tree to view the test cases in the test plan.
- Click Next.
- In Base filter text box provide the AQL expression.
- e.g. to create test plan for UI tests only use this one:
layer = "UI Tests"
(the mapping of test layer should be done for that).
- e.g. to create test plan for UI tests only use this one:
- Click Create test plan.
Running tests from a test plan
You can run tests from your test plan. There are two options to do that:
- From main page of Test plan section.
- From a test plan.
Both options will perform in the same way.
You need to click Run test plan button.
Next window will require some information to be provided. If you won't provide any data then Job on a CI server will be started with its default parameters.
- If omitted Launch name will be created with default parameters.
- It's better to add tags to your launch, it'll help with further filtering and search.
- Add a link to an issue tracker issue if your Launch is intended to check something related to a certain issue.
- Links will be added to the launch's information as usual HTML links
<a href="some-host">Some text</a>
. - Environments will define the conditions you want to use for your tests, i.e. branch of VCS, browser to use, URL for which you want to run your tests.
Selective running of automated test remark
If you are running a test plan for a build job that contains more tests than your test plan, here is what could happen:
- If your test framework does not have the capability of filtering the tests during the execution, then all the tests will be executed.
- If your test framework supports the filtering, then only tests from your test plan will be executed.