1. I haven't used cruise control. Does it add capabilities to what ANT
already offers, or only provides a web interface?
2. I attached the xsl files I slightly enhanced. I also would like to know
if JMeter is planning to develop report generation.
On 7/19/07, Ðavîd Låndïs <[EMAIL PROTECTED]> wrote:
I am currently using the ant task and XSL file found at
http://www.programmerplanet.org/pages/projects/jmeter-ant-task.php.
These results are automatically available from the cruise control
application now but it is quite meager what it displays.
Has anyone made any enhancements to this or is anything planned? It
would be especially nice if there was a way to integrate graphs into
this results page...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
Stylesheet for processing 2.1 output format test result files
To uses this directly in a browser, add the following to the JTL file as line 2:
<? xml-stylesheet type="text/xsl" href="../extras/jmeter-results-report_21.xsl" ?>
and you can then view the JTL in a browser
-->
<xsl:output method="html" indent="yes" encoding="US-ASCII" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
<xsl:template match="envResults">
<html>
<head>
<title>Environment Test Results</title>
<style type="text/css">
body {
font:normal 68% verdana,arial,helvetica;
color:#000000;
}
table tr td, table tr th {
font-size: 68%;
}
table.details tr th{
font-weight: bold;
text-align:left;
background:#a6caf0;
white-space: nowrap;
}
table.details tr td{
background:#eeeee0;
white-space: nowrap;
}
h1 {
margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
}
h2 {
margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
}
h3 {
margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.Failure {
font-weight:bold; color:red;
}
</style>
</head>
<body>
<xsl:call-template name="pageHeader" />
<xsl:call-template name="pagelist" />
<hr size="1" width="95%" align="left" />
</body>
</html>
</xsl:template>
<xsl:template name="pageHeader">
<h1>Environment Test Results</h1>
<table width="100%">
<tr>
<td align="left"></td>
<td align="right">Designed for use with <a href="http://jakarta.apache.org/jmeter">JMeter</a> and <a href="http://ant.apache.org">Ant</a>.</td>
</tr>
</table>
<hr size="1" />
</xsl:template>
<xsl:template name="pagelist">
<h2>Tests</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>Test</th>
<th>Passed</th>
<th>Link</th>
</tr>
<xsl:for-each select="/envResults/testResults">
<xsl:variable name="label" select="substring-before(httpSample/@tn, ' 1-')" />
<xsl:variable name="failed" select="boolean(count(httpSample[attribute::s='false']) > 0)" />
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$failed">Failure</xsl:when>
</xsl:choose>
</xsl:attribute>
<td>
<xsl:value-of select="$label" />
</td>
<td>
<xsl:choose>
<xsl:when test="$failed">False</xsl:when>
<xsl:otherwise>True</xsl:otherwise>
</xsl:choose>
</td>
<td>
<a href="{$label}.html">View</a>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet><?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
Stylesheet for processing 2.1 output format test result files
To uses this directly in a browser, add the following to the JTL file as line 2:
<? xml-stylesheet type="text/xsl" href="../extras/jmeter-results-report_21.xsl" ?>
and you can then view the JTL in a browser
-->
<xsl:output method="html" indent="yes" encoding="US-ASCII" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
<xsl:param name="filename"/>
<xsl:template match="testResults">
<html>
<head>
<title>Test Results</title>
<style type="text/css">
body {
font:normal 68% verdana,arial,helvetica;
color:#000000;
}
table tr td, table tr th {
font-size: 68%;
}
table.details tr th{
font-weight: bold;
text-align:left;
background:#a6caf0;
white-space: nowrap;
}
table.details tr td{
background:#eeeee0;
white-space: nowrap;
}
h1 {
margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
}
h2 {
margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
}
h3 {
margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
}
.Failure {
font-weight:bold; color:red;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<xsl:call-template name="pageHeader" />
<xsl:call-template name="steplist" />
<hr size="1" width="95%" align="left" />
<xsl:call-template name="detail" />
</body>
</html>
</xsl:template>
<xsl:template name="pageHeader">
<h1><xsl:value-of select="substring-before($filename, '.jtl')"/></h1>
<table width="100%">
<tr>
<td align="left"></td>
<td align="right">Designed for use with <a href="http://jakarta.apache.org/jmeter">JMeter</a> and <a href="http://ant.apache.org">Ant</a>.</td>
</tr>
</table>
<hr size="1" />
</xsl:template>
<xsl:template name="steplist">
<h2>Steps</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>Step (HTTP Request)</th>
<th>Passed</th>
</tr>
<xsl:for-each select="/testResults/*[not(@lb = preceding::*/@lb)]">
<xsl:variable name="label" select="@lb" />
<xsl:variable name="count" select="count(../[EMAIL PROTECTED] = current()/@lb])" />
<xsl:variable name="failureCount" select="count(../[EMAIL PROTECTED] = current()/@lb][attribute::s='false'])" />
<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>
<xsl:choose>
<xsl:when test="attribute::s='false'">False</xsl:when>
<xsl:otherwise>True</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template name="detail">
<xsl:variable name="allFailureCount" select="count(/testResults/*[attribute::s='false'])" />
<xsl:if test="$allFailureCount > 0">
<h2>Failure Detail</h2>
<xsl:for-each select="/testResults/*[not(@lb = preceding::*/@lb)]">
<xsl:variable name="failureCount" select="count(../[EMAIL PROTECTED] = current()/@lb][attribute::s='false'])" />
<xsl:if test="$failureCount > 0">
<h3><xsl:value-of select="@lb" /></h3>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<!--th>Response</th-->
<th>Failure Message</th>
</tr>
<xsl:for-each select="/testResults/[EMAIL PROTECTED] = current()/@lb][attribute::s='false']">
<tr>
<!--td><xsl:value-of select="@rc | @rs" /> - <xsl:value-of select="@rm" /></td-->
<td><xsl:value-of select="assertionResult/failureMessage" /></td>
</tr>
<tr>
<td><xsl:value-of disable-output-escaping="yes" select="responseData" /></td>
</tr>
</xsl:for-each>
</table>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:template>
</xsl:stylesheet>---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]