Hi,
how is it possible to write the error message of a test iteration into its header?
I modified the xsl by
<xsl:if test=".//item[@level='Error']">
<span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
</xsl:if>
Now the error message will be shown in the header of the iteration but also in the header of the parent iterations. How will the message be written only into the corresponding iteration?
Many thanks
Custom report template
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Custom report template
Hi,
In order to write the error message to the header of the test iteration insert your code at following position within your *.xsl-file :
Regards,
Robert
In order to write the error message to the header of the test iteration insert your code at following position within your *.xsl-file :
Code: Select all
<xsl:if test="./datarow/field">
<div class="datarow">
<xsl:apply-templates select="./datarow"/>
<xsl:if test=".//item[@level='Error']">
<span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
</xsl:if>
</div>
</xsl:if>
Robert
Re: Custom report template
Hi Robert,
thanks for your answer, but i would like to write the error message to the title of each iteration. Sorry that didn't make that clearer.
Best regards
thanks for your answer, but i would like to write the error message to the title of each iteration. Sorry that didn't make that clearer.
Best regards
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Custom report template
Hi UgaAga,
Nothing to worry about. Please add your code add the following position to your *.xsl file:
Robert
Nothing to worry about. Please add your code add the following position to your *.xsl file:
<li class="{@result} iteration" id="iteration{@rid}"> <h2 class="{@result}" onclick="OnLoadContentDynamic('{@rid}','iteration',this);"> <span class="ui-status-icon"></span> <xsl:choose> <xsl:when test="@type='test case iteration'">Iteration: </xsl:when> <xsl:otherwise>Repeat: </xsl:otherwise> </xsl:choose> <xsl:value-of select="./@iteration"/> <xsl:if test=".//item[@level='Error']"> <span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span> </xsl:if>The report should look somehow like this, after you inserted the code: Regards,
Robert
You do not have the required permissions to view the files attached to this post.
Re: Custom report template
Hi,
ok but in this case the error message will also be shown in the header of the parent iteration. This isn't what i would like to have. How can is it possible to prevent this?
Bye
ok but in this case the error message will also be shown in the header of the parent iteration. This isn't what i would like to have. How can is it possible to prevent this?
Bye
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Custom report template
Hello,
Unfortunately we cannot provide a solution for this issue since it is a highly customized solution and it diverges too far from our support field. Thank you for your understanding.
Regards,
Robert
Unfortunately we cannot provide a solution for this issue since it is a highly customized solution and it diverges too far from our support field. Thank you for your understanding.
Regards,
Robert
Re: Custom report template
No problem i found the solution on my own
<xsl:if test="./activity/item[@level='Error'] or ./activity/activity[@type='test module' or @type='module group']//item[@level='Error']">
<span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
</xsl:if>
<xsl:if test="./activity/item[@level='Error'] or ./activity/activity[@type='test module' or @type='module group']//item[@level='Error']">
<span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
</xsl:if>