Custom attributes

What is a custom attribute?

Custom Attributes are additional properties whose values are extracted from the source documents. They can be attached:

  • to a requirement at statement time: statement custom attributes
  • to a Coverage Link: coverage link custom attributes

The attribute is the property stored and displayed by Reqchecker. Its Tag is the marker used to extract its value from the source document; this syntax setting remains a tag.

Gui

  • Type: defines the attribute type, see below.
  • Name: the name of the attribute used in the reports.
  • Description: details to explain the meaning of the attrinute. The description is displayed as tooltip in the Coverage Matrix and the Verification Table.
  • Tag: the tag itself is a keyword used to extract the attribute value from the data source.

Presence and empty values

Statement custom attributes have two independent options:

  • Required for requirement IDs: enter a pattern to require the attribute on declared requirements whose whole identifier matches it. Leave this field empty to keep the attribute optional.
  • Allow empty: a present attribute may have an empty value. This option does not require the attribute to be present and does not apply to Yes/No attributes.

New definitions default to an empty identifier pattern and Allow empty checked. For example, you can leave #Commentaire : empty with these defaults. To include this marker in every requirement while allowing an empty comment, enter * in simple syntax or .* in advanced syntax and leave Allow empty checked.

The identifier pattern uses the project's expression syntax option:

  • Simple syntax, blue field: enter a wildcard pattern such as REQ-*. Use * to select all requirement IDs.
  • Advanced syntax, orange field: enter a regular expression such as REQ-[0-9]+. Use .* to select all requirement IDs.

Double-click the pattern field to open the expression editor and test the pattern against requirement IDs.

Both modes compare the whole identifier and respect case by default: REQ-* selects REQ-001, but not TEST-REQ-001 or req-001. For example, to require Verification for specification requirements while leaving it optional for test scenarios, enter REQ-* when the project uses simple syntax and test scenario identifiers start with TEST-.

Switching the project to advanced expression syntax converts the wildcard pattern. Returning to simple syntax resets the pattern to empty with the other expression fields; enter the desired obligation pattern again after confirming that reset.

To identify attributes to complete, open the requirement detail and read the names in parentheses after the status in the Status row. You can also consult this row in the HTML and Markdown requirement details and the requirement summary comments in Excel.

These options apply only to statement custom attributes, not to coverage link custom attributes.

Types

Yes/No

Yes/No extracts a true/false value if the tag is present.

For example, let an attribute named #Experimental whose presence means that the requirement is intended to be implemented for an experimental version of software.

<DSL_0010> Automatic type detection
#Experimental 
The software shall automatically detect the data type.

Single-Line text

Single-Line text extracts a text that follows the tag on the same line. It stops at the end of the line, or at the next tag.

For example, let a #C tag record a comment associated with a coverage link.

<<DSL_0010>> #C This is a comment on a single line

Multi-Line text

Multi-Line text extracts a text until the its end tag is reached. If end tag is empty, the text is extracted until another token (another tag, a new chapter, a new statement etc).

For example, let an attribute #Details record an explanation on several line.

<DSL_0010> Automatic type detection
#Experimental 
The software shall automatically detect the data type.
#Details
Here we can insert explanation to better understand:
* the requirement
* its contexts
* examples etc.
#End

Cell text

Cell text extracts a text in the next table cell. The document reader plug-in must support table recognition (for example .pdf, .docx).

For example, let Priority: tag record the priority.

<DSL_0010>
The software shall automatically detect the data type.
Priority:HighComponent:Software

Note

A table without explicit tags is not supported for documents. In this case, a spreadsheet program must be used, for example writing requirements in MS EXCEL.

For example such table is not supported in a MS Word document.

IDTextPriorityComponent
DSL_0010The software shall automatically detect the data type.HighSoftware
DSL_0020etc.

List

List extract an attribute with a set of possible values. The type 'List' accepts multiple values separated by punctuation (comma, semi-colon, space, non-breaking space). Each value is checked at computation time to verify that it belongs to the value list declared in the project.

For example, let an attribute Priority: with predefined values `High Medium Low' record the requirement priority.

<DSL_0010> Operating System
Priority: High
The software must be compliant with Windows 10.

The attribute can have several values for a same requirement. Several values can be defined on the same line: #Category A, B

A list accepts spaces for the values of a customised attribute if the separator used is a comma or a semi-colon. Otherwise, each word constitutes an element of the list.