Modifying Cell Background Color Based on Step Status in an ATML Test Results 6.01 or 5.0 Report
- Updated2025-07-23
- 2 minute(s) read
Modifying Cell Background Color Based on Step Status in an ATML Test Results 6.01 or 5.0 Report
TR6_Horizontal.xsl or TR5_Horizontal.xsl
Complete the following steps to modify the background color of the step status cell using the TR6_Horizontal.xsl or TR5_Horizontal.xsl file.
- Open the .xsl file you want to change.
- Search for the ADD_STATUS comment.
- Uncomment the following lines of
code:
<xsl:variable name="cellBackgroundColor" <xsl:choose> <xsl:when test="$outcome = 'Passed'">#FFFF00</xsl:when> <xsl:otherwise><xsl:value-of select="$statusBackgroundColor"/></xsl:otherwise> <xsl:choose> <td style="background-color:{$cellBackgroundColor};width:{$gSecondColumnWidth};"> The <xsl:when test="$outcome = 'Passed'">#FFFF00</xsl:when> expression changes the background color variable to yellow. You can use a custom XPath expression instead. ATML Test Results 2.02 Report Style Sheet does not need to be updated as it already references XPath. - Comment out the following line of code: <td style="color:{$statusColor};text-align:center;">
- Optionally, you can add Failed.jpg to the
C:\Images directory and uncomment the following lines of
code after the ADD_IMG comment to add an image next to the UUT
status text for Failed
steps:
<xsl:if test="$outcome = 'Failed'"> <img src = "C:\Images\Failed.jpg"/> </xsl:if>
The following figure shows a modified report with yellow cells for steps with a Passed status using the TR6_Horizontal.xsl or TR5_Horizontal.xsl file.
TR6_report.xsl, TR5_report.xsl, TR6_Expand.xsl, or TR5_Expand.xsl
Complete the following steps to modify the background color of the step status cell using the TR6_report.xsl, TR5_report.xsl, TR6_Expand.xsl, or TR5_Expand.xsl file.
- Open the .xsl file you want to change.
- Search for the ADD_STATUS comment.
- Uncomment the following lines of
code:
<xsl:variable name="cellBackgroundColor" <xsl:choose> <xsl:when test="$outcome = 'Passed'">#FFFF00</xsl:when> <xsl:otherwise><xsl:value-of select="$statusBackgroundColor"/></xsl:otherwise> <xsl:choose> <td style="background-color:{$cellBackgroundColor};width:{$gSecondColumnWidth};"> The <xsl:when test="$outcome = 'Passed'">#FFFF00</xsl:when> expression changes the background color variable to yellow. You can use a custom XPath expression instead. ATML Test Results 2.02 Report Style Sheet does not need to be updated as it already references XPath. - Comment out the following line of code: <td style="background-color:{$statusBackgroundColor};width:{$gSecondColumnWidth};">
- Optionally, you can add Failed.jpg to the
C:\Images directory and uncomment the following lines of
code after the ADD_IMG comment to add an image next to the UUT
status text for Failed
steps:
<xsl:if test="$outcome = 'Failed'"> <img src = "C:\Images\Failed.jpg"/> </xsl:if>
The following figure shows a modified report with yellow cells for steps with a Passed status using the TR6_report.xsl, TR5_report.xsl, TR6_Expand.xsl, or TR5_Expand.xsl file.