Page tree

This is the documentation of Xray Server. If you are looking for Xray Cloud, visit this page. Documentation of older versions of Xray Server is available in this page.

Skip to end of metadata
Go to start of metadata


Definition

Requirements and Defects are two concepts commonly related to Tests.

A Requirement represents a singular documented physical and functional need that a particular product or process must be able to perform. They are also an important input into the verification process, since tests should trace back to specific requirements, showing what elements and functions are necessary for the particular project.

A Defect represents a condition in a software product which does not meet a software requirement (as stated in the requirement specifications) or end-user expectations (which may not be specified but are reasonable). It can be displayed as an error, flaw, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways.

These two concepts can be mapped to different issue types in organizations.

requirements_and_defects

Often, a Defect issue type is also used as a Requirement. To assert that a Defect does not occur again, it can be also considered for testing. Xray allows the same issue type to be mapped as a Requirement and a Defect. So, a Defect can also be associated with Test issues and be considered for Requirement Coverage charts and Custom Fields. 

Requirements and Defect issues can be associated with Tests and Test Set issues with the Jira default linking mechanism. There are specific issue link types for associating these issue types:

  • Requirement R "is tested by" test T (or test set TS)
  • Test T (or test set TS) "tests" requirement R
  • Defect D "is created by" test T
  • Defect D "is tested by" test T (or test set TS)
  • Test T "created" defect D
  • Test T (or test set TS) "tests" defect D

xray_issue_linking

Customizing the "Tests" Issue Link Type: During the installation of Xray, the Issue Link Type "Tests" that is used in the associations between Tests/Test Sets and requirements is automatically configured. You can customize the default name, outward and inward description of this Issue Link Type, but after that, it is required to disable and then enable the add-on in the 'Manage add-ons' page.

Issue link "Test" has by default "tests" and "tested by" as outward and inward descriptions, respectively.

If you decide to downgrade to a version <= 3.0.x, make sure you restore the default Issue Link Type names and descriptions; otherwise Xray will create new Issue Link Types.

Sub-Requirements

A requirement can be associated with sub-requirements, resulting in a hierarchy of requirement issues. "Epic" requirements can thus be decomposed into smaller requirements, each associated with specific tests. This decomposition of requirements facilitates the management of epic requirements and makes their coverage analysis easier.

The requirement > sub-requirement (i.e., parent > child) relation can be defined in the "Issue Type Mapping" configuration section of Xray. Sub-Requirements can be associated with requirements using the Jira linking mechanism or using "Sub-Task" requirement issues.

Below are the different ways Xray considers issues as sub-requirements of a given "requirement". 

xray_subrequirements



For more information on Requirement Status and coverage, please go to the Coverage Analysis page.


Associating a Requirement

There are several ways to associate a Requirement issue with a Test issue.

From the Requirement issue view screen

Step 1: Open the Requirement you wish to associate a Test with. In the given example, New Feature issue types are mapped as Requirements.

Step 2: Select More > Link. The Link screen will appear.

Step 3: On the This issue field, select the tested by option.

Step 4: In order to select the Tests or Test Sets to be associated, you can:

- Input the desired Test/Test Set Issue Key on the Issue field;
- Click on the Down Arrow on the Issue field and select the Test from its History Search list;
- Click on the search for an issue link to use the Find Jira issues browser;

Step 5: Click Link.

From the Test issue view screen

Step 1: Open the Test you wish to associate a Requirement with.

Step 2: Select More > Link. The Link screen will appear.

Step 3: On the This issue field, select the tests option.

Step 4: In order to select the Requirements to be associated, you can:

- Input the desired Requirement Issue Key on the Issue field;
- Click on the Down Arrow on the Issue field and select the Requirement from its History Search list;
- Click on the search for an issue link to use the Find Jira issues browser;

Step 5: Click Link.


From the Test Set issue view screen

Step 1: Open the Test Set you wish to associate a Requirement with.

Step 2: Select More > Link. The Link screen will appear.

Step 3: On the This issue field, select the tests option.

Step 4: In order to select the Requirements to be associated, you can:

- Input the desired Requirement Issue Key on the Issue field;
- Click on the Down Arrow on the Issue field and select the Requirement from its History Search list;
- Click on the search for an issue link to use the Find Jira issues browser;

Step 5: Click Link.

Associating a Defect

There are two ways to associate a Defect issue with a Test issue.

From the Defect issue view screen

Step 1: Open the Defect you wish to associate a Test with.

Step 2: Select More > Link. The Link screen will appear.

Step 3: On the This issue field, select either the created by or the tested by option.

Step 4: In order to select the Tests to be associated, you can:

- Input the desired Test Issue Key on the Issue field;
- Click on the Down Arrow on the Issue field and select the Test from its History Search list;
- Click on the search for an issue link to use the Find Jira issues browser;

Step 5: Click Link.

From the Test issue view screen

Step 1: Open the Test you wish to associate a Defect with.

Step 2: Select More > Link. The Link screen will appear.

Step 3: On the This issue field, select the created or tests option.

Step 4: In order to select the Defects to be associated, you can:

- Input the desired Defect Issue Key on the Issue field;
- Click on the Down Arrow on the Issue field and select the Defect from its History Search list;
- Click on the search for an issue link to use the Find Jira issues browser;

Step 5: Click Link.

  • No labels