Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jmeter';使用ant和browser的xml日志看起来不同_Xml_Xslt_Xpath_Ant_Jmeter - Fatal编程技术网

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 &gt; 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生成:谢谢。