A customer asked us if it was possible to create a version of the requirements traceability report that would not display each of the individual mapped test cases, but instead would give summary counts by priority.

What Were They Looking for?

The customer was looking for a way to modify the custom reports to display something like:

Requirement NameRequirement importancePrio 1 TC count for ReqPrio 2 TC count for ReqPrio 3 TC count for ReqPrio 4 TC count for Req


There are several ways you could create a report like this:

  1. Take a standard report (e.g. Requirements Traceability) and modify the XSLT to display the data differently
  2. Create a custom report from scratch using the Entity SQL language

How to Create the Report

In this case, it's very similar to the standard requirements traceability report, we just need to tweak the XSLT.

  1. So in the Reports administration section, use the Clone button to make a copy of the Requirements Traceability Report.
  2. Then Edit the Report after you have cloned it.
  3. Delete the Test Case Reverse Traceability section, since we don't need it.
  4. Edit the main Requirements Forward Traceability section, and use this XSLT instead of the standard markup:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:template match="/RequirementData">
    <table class="DataGrid" style="width:100%">
        <th>Req #</th>
        <th>Requirement Name</th>
        <th>Requirement Importance</th>
        <th>Prio 1 TC count for Req</th>
        <th>Prio 2 TC count for Req</th>
        <th>Prio 3 TC count for Req</th>
        <th>Prio 4 TC count for Req</th>
      <xsl:for-each select="Requirement">
            RQ<xsl:value-of select="RequirementId"/>
            <xsl:attribute name="style">
              padding-left: <xsl:value-of select="string-length(IndentLevel)*2"/>px;
            <xsl:if test="IsSummary='True'">
                <xsl:value-of select="Name"/>
            <xsl:if test="IsSummary='False'">
              <xsl:value-of select="Name"/>
            <xsl:value-of select="ImportanceName"/>
            <xsl:value-of select="count(TestCases/TestCase[TestCasePriorityName = '1 - Critical'])"/>
            <xsl:value-of select="count(TestCases/TestCase[TestCasePriorityName = '2 - High'])"/>
            <xsl:value-of select="count(TestCases/TestCase[TestCasePriorityName = '3 - Medium'])"/>
            <xsl:value-of select="count(TestCases/TestCase[TestCasePriorityName = '4 - Low'])"/>

When run, this gives the following report:


Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 10/2/2018
  • Article ID: KB390
  • Views: 76