Requirement

  • To link a test or set of tests to a requirement, enter the following command line:
    REQUIREMENT <name> { , [<attrName> =|:] <attrValue> }
    Where:
      • <name> is the name of the requirement. Optionally, this name could be followed by attributes.
      • <attrName> is the name of the attribute. This name is optional. It is automatically added if it is missing.
      • <attrValue> is the value of the attribute.

    Example:

    
    REQUIREMENT REQ_TEST2ELEM_025, type=robustness, level:1, John
The tests linked by a requirement depend on the position of the keyword REQUIREMENT in the script:
HEADER add, 1, 1
<variable declarations for the test script>
BEGIN
  REQUIREMENT…  -- Requirement defined for all tests in the script
SERVICE add
  <local variable declarations for the service>
    REQUIREMENT… -- Requirement defined for all tests in the service
  TEST 1
    REQUIREMENT…        -- Requirement defined for the test only
  FAMILY nominal
  ELEMENT
    VAR variable1, INIT=0, EV=0
    VAR variable2, INIT=0, EV=0
    #<call to the procedure under test>
  END ELEMENT
  END TEST
END SERVICE

Attribute values can be overloaded by environment variables during pre-processing phase. For example, if $TARGETNAME is set, the value of the attribute $TARGETNAME in the script will be overloaded by this environment. This allows you to dynamically configure some attributes in your build chain depending on the execution context.

After the tests execution, a requirement status is computed for each requirement, based on the result of the tests that are linked to this requirement.

A tool rod2req generates an XML file with all the requirement status and a coverage status.