Reference elements from parallel nodes

Monday, October 21, 2019

I need to add a Requirement Number into the Test Steps grid in the Test Case Detailed report.

I noticed from the XML source of the report that the structure of the XML template is based on:













So Inside of this report's XML template I have a section for displaying the test steps where I need to add Req # as first column:

<xsl:if test="TestSteps/TestStep">
          <div class="Title4">
            Test Steps:
          <table class="DataGrid">
              <th>Expected Result</th>
              <th>Sample Data</th>
              <th>Last Status</th>
            <xsl:for-each select="TestSteps/TestStep">
                  <xsl:value-of select="position()"/>
                <xsl:if test="string(LinkedTestCaseId)">
                  <td colspan="3">
                    <xsl:value-of select="Description" disable-output-escaping="yes"/>
                    '<xsl:value-of select="LinkedTestCaseName"/>'
                    <xsl:for-each select="Parameters">
                        <xsl:for-each select="TestStepParameter">
                          <xsl:value-of select="Name"/> = '<xsl:value-of select="Value"/>',


Please explain how it works to link to the parent (TestCase) node using <xsl:if test="string(LinkedTestCaseId)"> check and if I can potentially reach into the <Requirements>...</Requirements> node to show the linked Requirements # from "TestSteps/TestStep" node.

I understand that I could add a Custom SQL section (which I already have) but the result of that shows at the bottom of the report and I really only need to add one column to the existing grid to fulfill my requirements so there is no reason to make it complicated. If I need to re-do the whole report in Custom SQL displaying TC, TS and Reqs - this is also too much work and I'm not sure I could get all Custom Properties and all text values correctly in my SQL.

Please help!

Thank you

1 Replies
Thursday, October 24, 2019
re: shurix Monday, October 21, 2019


I think this article is applicable to your question:



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


  • Started: Monday, October 21, 2019
  • Last Reply: Thursday, October 24, 2019
  • Replies: 1
  • Views: 1550