jmeter';使用ant和browser的xml日志看起来不同
我在jmeter';使用ant和browser的xml日志看起来不同,xml,xslt,xpath,ant,jmeter,Xml,Xslt,Xpath,Ant,Jmeter,我在jmeter-results-report_21.xsl中做了一些更改,以在html报告中显示测试用例名称。直接在浏览器中打开时效果很好,但当我使用ant生成报告时,它会将页面顶部的案例测试名称和上面的URL分组。这就像for没有嵌套一样 <xsl:for-each select="/testResults/*[not(@tn = preceding::*/@tn)]"> <xsl:variable name="labelCaso" select="@tn" /> &
jmeter-results-report_21.xsl中做了一些更改,以在html报告中显示测试用例名称。直接在浏览器中打开时效果很好,但当我使用ant生成报告时,它会将页面顶部的案例测试名称和上面的URL分组。这就像for没有嵌套一样
<xsl:for-each select="/testResults/*[not(@tn = preceding::*/@tn)]">
<xsl:variable name="labelCaso" select="@tn" />
<tr><xsl:value-of select="$labelCaso" /></tr>
<xsl:for-each select="/testResults/*[not(@lb = preceding::*/@lb)] ">
<xsl:variable name="label" select="@lb"/>
<xsl:variable name="count" select="count(../*[@lb = current()/@lb] [attribute::tn=$labelCaso])" />
<xsl:variable name="failureCount" select="count(../*[@lb = current()/@lb][attribute::s='false'][attribute::tn=$labelCaso])" />
<xsl:variable name="successCount" select="count(../*[@lb = current()/@lb][attribute::s='true'][attribute::tn=$labelCaso])" />
<xsl:variable name="successPercent" select="$successCount div $count" />
<xsl:variable name="totalTime" select="sum(../*[@lb = current()/@lb][attribute::tn=$labelCaso]/@t )" />
<xsl:variable name="averageTime" select="($totalTime div $count)" />
<xsl:variable name="minTime">
<xsl:call-template name="min">
<xsl:with-param name="nodes" select="../*[@lb = current()/@lb][attribute::tn=$labelCaso]/@t" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="maxTime">
<xsl:call-template name="max">
<xsl:with-param name="nodes" select="../*[@lb = current()/@lb][attribute::tn=$labelCaso]/@t" />
</xsl:call-template>
</xsl:variable>
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$failureCount > 0">Failure</xsl:when>
</xsl:choose>
</xsl:attribute>
<td>
<xsl:value-of select="$label" />
</td>
<td align="center">
<xsl:value-of select="$count" />
</td>
<td align="center">
<xsl:value-of select="$failureCount" />
</td>
<td align="right">
<xsl:call-template name="display-percent">
<xsl:with-param name="value" select="$successPercent" />
</xsl:call-template>
</td>
<td align="right">
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$averageTime" />
</xsl:call-template>
</td>
<td align="right">
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$minTime" />
</xsl:call-template>
</td>
<td align="right">
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$maxTime" />
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
失败
找到解决方案!在行中:缺少带有标记的Now,它在两种情况下都工作,直接在浏览器中,由ant生成:谢谢。