You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Pre-Conditions specify the condition which needs to be fulfilled in order to execute a test.

 A Pre-Condition is like defining the step "0" for your tests. This is very useful on many use cases where you have to start by doing exactly the same thing (e.g. if you are going to do something in a system, most probably you 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 used independentely (e.g. some Test may require just to restore the DB, another may require just to authenticate, and others may require that both things, or even more, need to be done before starting executing the steps).  


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.

  • On Manual Type Pre-Conditions, are inputted the Conditions to be executed by the user before starting the Associated Test.
  • On Automated[Generic] Type Pre-Conditions, are inputted the Conditions to be executed by the external tool before starting the Associated Test.
  • On Automated[Cucumber] Type Pre-Conditions, are inputted the Cucumber Background Gherkin clauses to be executed before starting the associated Scenarios.

Actions

Create

To create a new Pre-Condition issue:

Step 1: Click the Create Issue at the top of the screen to open the Create Issue dialog box.

Step 2: Select the relevant Project and on Issue Type select Pre-Condition.

Step 3: Type a Summary for the Pre-Condition and complete any appropriate fields — at least required ones which are marked by an asterisk.

Step 4: On the Pre-Condition Details tab select the Pre-Condition Type and complete any appropriate fields;


Optional:
- Click on the Tests tab to associate the current issue with Tests;

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 1: Click the Edit button (at the top-left of the 'view issue' page) to open the Edit Issue dialog / page.

Step 2: Modify your Pre-Condition details in the appropriate fields of the Edit Issue General tab.

Step 3: Modify your Pre-Condition's Details under the identically named tab on the Edit Issue page.

Optional:
- Click on the Tests tab to edit Test associations;

Step 4: Click the Update button to save your changes.

Using the Inline Edit for JIRA Plugin

To Edit an existing Pre-Condition issue using inline-edit:

Step 1: On the Pre-Condition page view hover your mouse over a field and click it to Edit Inline.

Examples:
- You can hover on the actual Pre-Condition Type, click it to enter the edit mode, and choose other available option on the select field;
- You can hover on the Condition field, click it to enter the edit mode, and modify the contents;

Step 2: To save the changes just click outside of the field area of click in the save button located in the bottom right corner of the editing field. 

Clone

To clone a Pre-Condition issue:

Step 1: Open the Pre-Condition you wish to Clone.

Step 2: Select More > Clone. The Clone Issue screen will appear

Step 3: You can edit the clone Pre-condition's Summary if you wish.

- 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:

Step 1: Open the Pre-Condition you wish to associate a Test with.

Step 2: Click the Associate Tests button (under the Tests tab on the view page) to open the Add Tests dialog box.

Step 3: Select or search the Test issues to be associated with the Pre-Condition:

Select Test Issues - In order to select the Tests to be associated you can, under the Select tab:

- Input the desired Test Issue Key on the Tests field;
- Click on the Down Arrow on the Tests field and select the Test from its History Search list;
- Click on the + button wich will prompt an Issue Selector Pop-Up; 
- Click on the Search tab to use the Find JIRA issues browser - More here;

Search Test Issues - In order to search for Tests to be associated you can, under the Search tab:

- Browse for the desired Test ProjectType or terms it Contains;
- Click on the More button to add more browse fields such as LabelFix Version, Test SetTest Set Fix VersionRequirementRequirement Fix Version, Saved Filters and Workflow Status;
- Click on the Magnifier button after filling the browse fields, to get a list of matching entries; 
- Click on the Advanced button to perform a JQL search - More here;


Step 4: Click Add.

Remove Tests

To remove Tests from a Pre-Condition from the Pre-Condition issue view screen:

Step 1: Open the Pre-Condition you wish to remove a Test.

Step 2: On the Tests table hover the desired Test row and click on the Trash button that appears in 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. 

  • Remove - Deletes all the selected Tests associations with a Pre-Condition.

To execute these bulk actions:

Step 1: Open the Pre-Condition issue.

Step 2: Click on the Bulk button to activate the bulk edit mode (under the Tests section on the view page). A checkbox appears on each Test row and also the bulk actions button in the actions column header.

Step 3: Selected the desired Test issues.

Step 4: Click the bulk actions gear located on the actions column header and choose one of the available actions.

  • No labels