Background

A customer asked us - I work in a project which has requirements traced directly to test steps and I would like the ability to report on execution progress at the test step level. I'd like to see which test steps are passed/failed, and if they are traced to a requirement.

Custom Report

If you use the following Entity SQL as a custom section:

select RS.REQUIREMENT_ID, RQ.NAME AS REQUIREMENT_NAME, TC.TEST_CASE_ID, TC.NAME AS TEST_CASE_NAME, RS.TEST_STEP_ID, TS.EXECUTION_STATUS_NAME
from SpiraTestEntities.R_RequirementTestSteps as RS
join SpiraTestEntities.R_Requirements as RQ on RS.REQUIREMENT_ID = RQ.REQUIREMENT_ID
join SpiraTestEntities.R_TestSteps as TS on RS.TEST_STEP_ID = TS.TEST_STEP_ID
join SpiraTestEntities.R_TestCases as TC on TC.TEST_CASE_ID = TS.TEST_CASE_ID
where RQ.PROJECT_ID = ${ProjectId}

Press on Create Default Template or simply copy and paste the following code: 

<?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="/RESULTS">
    <table class="DataGrid"><tr><th>REQUIREMENT_ID</th><th>REQUIREMENT_NAME</th><th>TEST_CASE_ID</th><th>TEST_CASE_NAME</th><th>TEST_STEP_ID</th><th>EXECUTION_STATUS_NAME</th></tr>
      <xsl:for-each select="ROW">
        <tr><td><xsl:value-of select="REQUIREMENT_ID"/></td><td><xsl:value-of select="REQUIREMENT_NAME"/></td><td><xsl:value-of select="TEST_CASE_ID"/></td><td><xsl:value-of select="TEST_CASE_NAME"/></td><td><xsl:value-of select="TEST_STEP_ID"/></td><td><xsl:value-of select="EXECUTION_STATUS_NAME"/></td>
        </tr>
      </xsl:for-each>
        </table>
    </xsl:template>
</xsl:stylesheet>

Click Save twice.

Click Save on both report pages, so to make it ready for use from Report Center.

It will display the following report for you:

Requirement IDRequirement NameTest Case IDTest Case NameTest Step IDExecution Status