Requirement Coverage Report grouped by Component name

Friday, August 10, 2018
Avatar

Hi

I would like to create report which will looks like that

Component nameCoveringPassedFailedBlockedIn Progress
Book Management1783020%
Author Management320150%
Administration110010%

 

all Requirements are split out into 10 Components (parents requirement) to have better overview of status of each component, and I need to know what is the Requirement coverage total in each component + progress.

in code I have only overview of each Coverage name in separate column... else, need help here

<?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>Component</th>
        <th>Name</th>
        <th>Priority</th>
        <th>Status</th>
        <th>Covering</th>
        <th>Passed</th>
        <th>Failed</th>
        <th>Blocked</th>
        <th>Task</th>
        <th>%On Schedule</th>
        <th>%Running Late</th>
        <th>%Starting Late</th>
        <th>%Not Started</th>
        <xsl:for-each select="Requirement[1]/CustomProperties/CustomProperty">
          <th>
            <xsl:value-of select="Alias"/>
          </th>
        </xsl:for-each>
      </tr>
      <xsl:for-each select="Requirement">
        <tr>
          <td>
            <xsl:value-of select="ComponentName"/>
          </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="ImportanceName"/>
          </td>
          <td>
            <xsl:value-of select="RequirementStatusName"/>
          </td>
          <td>
            <xsl:value-of select="CoverageCountTotal"/>
        </td>
        <td>
           <xsl:value-of select="CoverageCountPassed"/>
        </td>
        <td>
            <xsl:value-of select="CoverageCountFailed"/>
        </td>
        <td>
            <xsl:value-of select="CoverageCountBlocked"/> </td>
          <td>
            <xsl:value-of select="TaskCount"/>
        </td>
        <td>
            <xsl:value-of select="TaskPercentOnTime"/>
        </td>
        <td>
            <xsl:value-of select="TaskPercentLateFinish"/>
        </td>
        <td>
            <xsl:value-of select="TaskPercentNotStart"/>
        </td>
        <td>
            <xsl:value-of select="TaskPercentLateStart"/>
          </td>

          <xsl:for-each select="CustomProperties/CustomProperty">
            <xsl:choose>
              <xsl:when test="Type='Date'">
                <td class="Date">
                  <xsl:call-template name="format-date">
                    <xsl:with-param name="datetime" select="Value" />
                  </xsl:call-template>
                </td>
              </xsl:when>
              <xsl:otherwise>
                <td>
                  <xsl:value-of select="Value" disable-output-escaping="yes"/>
                </td>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:for-each>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>

1 Replies
Friday, August 10, 2018
Avatar
re: AleksandraM Friday, August 10, 2018
COMPONENT_NAMECoveringPassedFailed
 42216
Administration000
Author Management1472
Book Management30154

 

select R.COMPONENT_NAME,sum(R.COVERAGE_COUNT_TOTAL) as Covering,

sum(R.COVERAGE_COUNT_PASSED) as Passed,

sum(R.COVERAGE_COUNT_FAILED) as Failed

from SpiraTestEntities.R_Requirements as R

where R.PROJECT_ID = ${ProjectId}

group by R.COMPONENT_NAME

 

 

 

<?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" style="width:40%">
<tr><th>COMPONENT_NAME</th><th>Covering</th><th>Passed</th><th>Failed</th></tr>
      <xsl:for-each select="ROW">
        <tr><td><xsl:value-of select="COMPONENT_NAME"/></td><td><xsl:value-of select="Covering"/></td><td><xsl:value-of select="Passed"/></td><td><xsl:value-of select="Failed"/></td>
        </tr>
      </xsl:for-each>
        </table>
    </xsl:template>
</xsl:stylesheet>

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: Friday, August 10, 2018
  • Last Reply: Friday, August 10, 2018
  • Replies: 1
  • Views: 2021