Workflow for a Traceability Coverage Matrix

You can create a report to retrieve coverage information from a scope. You can create such a scope in Systems Traceability.

Recommendation: In the following scenario, the variable default names are kept. Customize these names to clarify the report template.


Before you begin: In Systems Traceability:
  1. Create a scope containing requirements.
  2. Create traceability links with nodes ("OR" coverage) between these requirements.

    For more information, see 3D Modeling | Systems Integration | Systems Traceability | Systems Traceability | Computing Traceability | About Traceability Computation.

In Report Template Design, add System Scope in the available input types, because objects from Systems Traceability are not defined as input types by default. For more information, see Configuring Input Types.

See Also
About Workflow Overview
  1. To define a report template for scopes:
    1. From the Parameters area of the Properties tab, click New .
    2. In the Name field, enter systemScope.
    3. From the Type list, select System Scope.
  2. To access the scope data:
    1. From the Data tab, expand the following variables and categories.
    2. Drop the method to the work area.
    Variable and Type Category Method Work Area
    systemScope: System Scope Navigation Scope Navigation Empty space.

    Renaming: In the Variable field of the Properties tab, select this loop and enter scope to rename the variable.

    scope: Scope Outgoing relationships To analysisResults Loop on Scope Navigation of systemScope: scope

    Renaming: In the Variable field of the Properties tab, select this loop and enter results to rename the variable.

    results: Scope's analysisResults Outgoing relationships To Traceability Loop on To analysisResults of scope: results

    Renaming: In the Variable field of the Properties tab, select this loop and enter tracea to rename the variable.

    tracea: Traceability Preview Get Previews Loop on To Traceability of results: tracea

    Renaming: In the Variable field of the Properties tab, select this loop and enter preview to rename the variable.

    Recommendation:

    In the Condition field of the Properties area, enter the OTScript condition: EACHINDEX = 1.

    This condition limits the displayed result to the first occurrence that is found in the scope view.
  3. To manage the display of the scope data:
    1. From the Structure tab, drop Section to Loop on Get Previews of tracea: preview, and then drop Paragraph to this section.
    2. From the Data tab, expand the following variables and categories.
    3. Drop the method to the work area.
    Variable and Types Category Method Work Area
    preview: Preview Attributes title Title of the section in Loop on Get Previews of tracea: preview
    preview: Preview Preview Get Picture Paragraph in the section
    preview: Preview Preview Get Rich Text Paragraph in the section
  4. To access the coverage ratio of the requirements:
    1. From the Data tab, expand the following variables and categories.
    2. Drop the methods to the work area.
    Variable and Type Category Method Work Area
    tracea: Traceability Outgoing relationships To hasPart Loop on To Traceability of results: tracea, under the previous loop Loop on Get Previews of tracea: preview

    Rename the variable by hasPart.

    hasPart: Traceability's hasPart Outgoing relationships To Traceability Document Loop on To hasPart of tracea: hasPart

    Rename the variable by traceaDoc

  5. To manage the display of the coverage ratio of the requirements:
    1. From the Structure tab, drop Section to Loop on To Traceability Document of hasPart: traceaDoc, and then Paragraph to this section.
    2. From the Data tab, expand the following variables and categories, and then drop the method to the work area.
    Variable and Type Category Method Work Area
    traceaDoc: Traceability Document Attributes title Title in the section title.
    traceaDoc: Traceability Document Attributes coverageRatio Paragraph in the section
    Tip: To introduce this information in your preview:
    1. From the Structure tab, add a Text element.
    2. Enter Coverage ratio:.
  6. From the Structures tab, to display traceability links covering each requirement in a table:
    1. Drop Table to the section (below the paragraph).
    2. In the first cell, drop Text and enter Requirement.
    3. In the second cell, drop Text and enter Covered By.
  7. From the Data tab, expand the following variables and categories, and then drop the methods to the work area.

    Important: For this scenario, you must create an OTScript method to retrieve the children of the requirement. For this, copy the following code in the OTScript tab:
    METHOD SMM.SycType.Traceability.Node.getAllChildren() -doc : {
        THIS.*(`dc:hasPart`.`syctype:Traceability.Node`)
    } LABEL "Extensions,Get All Children";
    

    For more information, see About the OTScript Files Editor.

    Variable and Type Category Method Work Area
    traceaDoc: Traceability Document Extensions Get All Children In the table, below the header row of the table.

    Rename the variable by node.

    To organize the display of your preview, add one row from the Structures tab into Loop on Get All Children of traceaDoc: node.

    node: Traceability Node Attributes title In Loop on Get All Children of traceaDoc: node in the first cell of the row in the table
    node: Traceability Node Incoming relationships From destination In Loop on Get All Children of traceaDoc: node in the second cell of the row in the table.

    Rename the variable by destination.

    destination: Traceability Node's~destination Incoming relationships From Traceability Link Loop on From destination of node: destination

    Rename the variable by link.

    link: Traceability Link Outgoing relationships To source Loop on From Traceability Link of destination: link

    Rename the variable by source.

    source: Traceability Link's source Outgoing relationships To Traceability Node Loop on To source of link: source

    Rename the variable by node2.

    node2: Traceability Node Attributes title Loop on To Traceability Node of source: node2



You can visualize the report file to be generated. For more information, see Previewing Reports.