Introduction

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


Additional Information

Please make sure you check the following pages in our documentation that cover many topics of how to work with Requirements and Defects and also how to analyze the Test Coverage.


  • No labels