All tests with test execution Status and Actual results fields

Sunday, November 13, 2016
Avatar
This report produces a single line for every test case executed with the Status(e.g. Passed, Failed) and the Actual result as typed in my the tester. This is useful if the testers put the defect ID# against failures and blockers.

ver
SpiraTeam v5.0.0.8

Report Sample
Test Case ID Test Case Name Status Date Executed Actual Result
1391 eReport - sanity checks Failed 13/09/2016 236
1391 eReport - sanity checks Failed 9/09/2016 259
1395 ePromotions - sanity checks Passed 20/09/2016  
1395 ePromotions - sanity checks Passed 13/09/2016  
1395 ePromotions - sanity checks Passed 9/09/2016  
1565 #18 - Member Export Publisher - 6 Edit a member by adding a comma Caution 19/09/2016 Exported with Comma and Quotes
1574 #18 - Member Export Publisher - 15 Edit member and with an invalid gender Caution 19/09/2016 The member has a gender set as A (truncated from ABCDEF) , this may cause issues when importing data
2601 VIP Room Access report Blocked 21/09/2016 289
2602 Player Status Report Blocked 21/09/2016 289
2603 Player Status Change History Passed 9/09/2016  


Query
select R.TEST_CASE_ID, R.TEST_CASE_NAME, R.EXECUTION_STATUS_NAME, R.ACTUAL_RESULT, R.END_DATE from SpiraTestEntities.R_TestRunSteps as R where R.PROJECT_ID = ${ProjectId}

Template
<?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">


<xsl:call-template name="format-date">
 <xsl:with-param name="datetime" select="CreationDate" />
</xsl:call-template>


    <table class="DataGrid">
 <tr>
 <th>Test Case ID</th>
 <th>Test Case Name</th>
 <th>Status</th>
 <th>Date Executed</th>
 <th>Actual Result</th>
 </tr>
       <xsl:for-each select="ROW">
         <tr>
 <td><xsl:value-of select="TEST_CASE_ID"/></td>
 <td><xsl:value-of select="TEST_CASE_NAME"/></td>
 <td><xsl:value-of select="EXECUTION_STATUS_NAME"/></td>

<td class="Date">
              <xsl:call-template name="format-date">
                <xsl:with-param name="datetime" select="END_DATE" />
              </xsl:call-template>
            </td>

 <td><xsl:value-of select="ACTUAL_RESULT" disable-output-escaping="yes"/></td>
         </tr>
       </xsl:for-each>
       </table>
    </xsl:template>

 <xsl:template name="format-date">
    <xsl:param name="datetime"/>
    <xsl:variable name="date" select="substring-before($datetime, 'T')" />
    <xsl:variable name="year" select="substring-before($date, '-')" />
    <xsl:variable name="month" select="substring-before(substring-after($date, '-'), '-')" />
    <xsl:variable name="day" select="substring-after(substring-after($date, '-'), '-')" />
    <xsl:variable name="time" select="substring-before(substring-after($datetime, 'T'), '.')" />
    <xsl:variable name="monthname">
      <xsl:choose>
        <xsl:when test="$month='01'">
          <xsl:value-of select="'Jan'"/>
        </xsl:when>
        <xsl:when test="$month='02'">
          <xsl:value-of select="'Feb'"/>
        </xsl:when>
        <xsl:when test="$month='03'">
          <xsl:value-of select="'Mar'"/>
        </xsl:when>
        <xsl:when test="$month='04'">
          <xsl:value-of select="'Apr'"/>
        </xsl:when>
        <xsl:when test="$month='05'">
          <xsl:value-of select="'May'"/>
        </xsl:when>
        <xsl:when test="$month='06'">
          <xsl:value-of select="'Jun'"/>
        </xsl:when>
        <xsl:when test="$month='07'">
          <xsl:value-of select="'Jul'"/>
        </xsl:when>
        <xsl:when test="$month='08'">
          <xsl:value-of select="'Aug'"/>
        </xsl:when>
        <xsl:when test="$month='09'">
          <xsl:value-of select="'Sep'"/>
        </xsl:when>
        <xsl:when test="$month='10'">
          <xsl:value-of select="'Oct'"/>
        </xsl:when>
        <xsl:when test="$month='11'">
          <xsl:value-of select="'Nov'"/>
        </xsl:when>
        <xsl:when test="$month='12'">
          <xsl:value-of select="'Dec'"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="''" />
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:value-of select="concat($day, '-' ,$monthname, '-', $year)" />
  </xsl:template>

</xsl:stylesheet>

2 Replies
Monday, November 14, 2016
Avatar
re: DaveFederal Sunday, November 13, 2016
Thanks Dave.
Wednesday, May 8, 2024
Avatar
re: DaveFederal Sunday, November 13, 2016

Many 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: Sunday, November 13, 2016
  • Last Reply: Wednesday, May 8, 2024
  • Replies: 2
  • Views: 3219