Jmeter Html报告优化

 

1. 邮件发送html报告有中文时,显示乱码: 

修改encoding为“GBK” 

<xsl:output method="html" indent="yes" encoding="GBK" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" /> 

 

2. Summary中只标红Failures数: 

  • 屏蔽Summary中class属性 

<!--  

<xsl:attribute name="class">  

<xsl:choose>  

<xsl:when test="$allFailureCount &gt; 0">Failure</xsl:when>  

</xsl:choose>  

</xsl:attribute>  

-->  

修改allFailureCount 

<td align="center"> 

<xsl:value-of select="$allSuccessCount" /> 

</td> 

<xsl:choose> 

<xsl:when test="$allFailureCount &gt; 0"> 

<td align="center" style="font-weight:bold"> 

<font color="red"> 

<xsl:value-of select="$allFailureCount" /> 

</font> 

</td> 

</xsl:when> 

<xsl:otherwise> 

<td align="center"> 

<xsl:value-of select="$allFailureCount" /> 

</td> 

</xsl:otherwise> 

</xsl:choose> 

posted @ 2017-11-28 13:22  春田花花同学会  阅读(225)  评论(0编辑  收藏  举报