Page History
...
A Pre-Condition is like defining the step "0" for your tests. This is very useful in many use cases where you have to start by doing exactly the same thing. For example, if you are going to do something on a system, you most probably have to authenticate first, right? But sometimes, you have to do several things (e.g., restore DB, authenticate) before going through your Test steps. And each of those things may be done and used independently, i.e., some Tests may require just restoring the DB, another may require just to authentication, and others may require both things or more.
Table of Contents |
---|
Pre-Condition Types
Pre-Conditions Types must be the same Type of the Test they are associated with, so they can be Manual or Automated.
- Manual Type Pre-Conditions: Conditions to be executed by the user before starting the Associated Test.
- Automated[Generic] Type Pre-Conditions: Conditions to be executed by the external tool before starting the Associated Test.
- Automated[Cucumber] Type Pre-Conditions: Cucumber Background Gherkin clauses to be executed before starting the associated Scenarios.
Actions
Table of Contents | ||||
---|---|---|---|---|
|
Create
To create a new Pre-Condition issue:
...
Step 5: When you are satisfied with the content of your Pre-Condition, click the Create button. If you selected the Create another check box (above), a new Create Issue dialog appears. This issue is automatically pre-populated with your previous Pre-Condition details, while leaving the Summary field blank.
Edit
Using the Edit Issue dialog box
To Edit an existing Pre-Condition issue using the edit page:
...
Step 4: Click the Update button to save your changes.
Using the Inline Edit for Jira App
To Edit an existing Pre-Condition issue using inline edit:
...
Step 2: To save the changes, just click outside of the field area of click the save button located in the bottom right corner of the editing field.
Clone
To clone a Pre-Condition issue:
...
- If the pre-condition contains links to other issue(s), you can select whether or not to include the links in the new clone pre-condition.
- If the pre-condition contains sub-tasks, you can select whether or not to create the sub-tasks in the new clone pre-condition.
- If the pre-condition contains attachments, you can select whether or not to include the attachments in the new clone pre-condition.
Step 4: Click Create.
Change Pre-Condition Type
If the Pre-Condition type is changed, and the Pre-Condition is already associated with tests, a validation process will take place to check if there are any conflicts between Test types and the new Pre-Condition type. If there are conflicts, a confirmation popup dialog will appear showing the Test issue keys with different types. If the operation is confirmed, the association between the Pre-Condition and the conflicted Test issues will be removed.
Screenshot: Example Delete Pre-Condition Association? dialog box
Associate Tests
To associate Tests with a Pre-Condition from the Pre-Condition issue view screen:
...
- Check the tests you wish to add from the listed results.
Step 6: Add tests by pressing "Add selected".
Remove Tests
To remove Tests from a Pre-Condition using the Pre-Condition issue view screen:
...
Step 2: On the Tests table, hover over the desired Test row and click on the Trash button that appears at the end of the row. You will be prompted with a confirmation dialog.
Bulk Operations
Xray provides the following bulk operations on the Tests table.
...