Custom Requirements Traceability Report

Tuesday, November 28, 2017
Avatar

A customer wanted a RTM report that looped per row for each requirement, rather than having a set of requirements IDs concatenated with commas:

his section displays a list of all the requirements with the associated test cases/requirements.

Req #NameTypeStatusRelease #Test TraceabilityRequirements Traceability
RQ4Ability to add new books to the systemFeatureDeveloped1.0.0.0.0001TC2,TC13,TC8RQ6
RQ4Ability to add new books to the systemFeatureDeveloped1.0.0.0.0001TC2,TC13,TC8RQ30
RQ5Ability to edit existing books in the systemFeatureTested1.0.0.0.0001TC3,TC8RQ57
RQ5Ability to edit existing books in the systemFeatureTested1.0.0.0.0001TC3,TC8RQ7
RQ5Ability to edit existing books in the systemFeatureTested1.0.0.0.0001TC3,TC8RQ31
RQ6Ability to delete existing books in the systemFeatureTested1.0.0.0.0002TC8,TC12RQ4
RQ7Ability to associate books with different subjectsFeatureDeveloped1.1.0.0.0001TC4,TC8RQ5
RQ57Ability to report on book editionsFeatureAccepted TC4,TC2,TC5RQ5
RQ30Creating a new book in the systemUse CaseCompleted TC2RQ4
RQ31Editing an existing book in the systemUse CaseCompleted TC3RQ5

 

2 Replies
Tuesday, November 28, 2017
Avatar
re: inflectra.david Tuesday, November 28, 2017

Here's the XSLT you should use for this report:

<?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%">
      <tr>
        <th>Req #</th>
        <th>Name</th>
        <th>Type</th>
        <th>Status</th>
        <th>Release #</th>
        <th>Test Traceability</th>
        <th>Requirements Traceability</th>
      </tr>
      <xsl:for-each select="Requirement">
		  <xsl:for-each select="Requirements/ArtifactLink">
				<tr>
				  <td>
					RQ<xsl:value-of select="../../RequirementId"/>
				  </td>
				  <td>
					<xsl:attribute name="style">
					  padding-left: <xsl:value-of select="string-length(../../IndentLevel)*2"/>px;
					</xsl:attribute>
					<xsl:if test="../../IsSummary='True'">
					  <b>
						<xsl:value-of select="../../Name"/>
					  </b>
					</xsl:if>
					<xsl:if test="../../IsSummary='False'">
					  <xsl:value-of select="../../Name"/>
					</xsl:if>
				  </td>
				  <td>
					<xsl:value-of select="../../RequirementTypeName"/>
				  </td>
				  <td>
					<xsl:value-of select="../../RequirementStatusName"/>
				  </td>
				  <td>
					<xsl:value-of select="../../ReleaseVersionNumber"/>
				  </td>
				  <td>
					<xsl:for-each select="../../TestCases/TestCase">
					  <xsl:if test="position() > 1">,</xsl:if>
					  TC<xsl:value-of select="TestCaseId"/>
					</xsl:for-each>
				  </td>
				  <td>
					  RQ<xsl:value-of select="ArtifactId"/>
				  </td>
				</tr>
			</xsl:for-each>
      </xsl:for-each>
	</table>
  </xsl:template>
</xsl:stylesheet>

 

Monday, August 13, 2018
Avatar
re: inflectra.david Tuesday, November 28, 2017

Hello Adam,

We'd like to have a trace between requirements to test cases to test results (latest), can you please advise to achieve that?

What we'd like to see in the table

REQ1  - Req Name - TC1 - Test Results (i.e. Pass/Fail)

If there's a req covered by 2 TCs, we want to see that requirement splitted into 2 rows for each TC

Thanks,

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Tuesday, November 28, 2017
  • Last Reply: Monday, August 13, 2018
  • Replies: 2
  • Views: 6917