From: Siegfried G. <wd...@us...> - 2005-03-09 11:37:41
|
wdsgoe 05/03/09 03:37:32 Modified: webtest/xdocs changes.xml webtest/src/plugin-resources maven-webtest-report.xsl Log: Added fix to XSLT Revision Changes Path 1.11 +8 -2 maven-plugins/webtest/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/webtest/xdocs/changes.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- changes.xml 3 Mar 2005 15:27:08 -0000 1.10 +++ changes.xml 9 Mar 2005 11:37:31 -0000 1.11 @@ -8,9 +8,15 @@ <releases> <release version="0.9.2" date=""> + <action dev="wdsgoe" type="fix" due-to="David Gerber"> + Fixed anchors in the XSLT + </action> + <action dev="wdsgoe" type="fix" due-to="Krystian Nowak"> + Hopefully fixed passing emtpy parameters to ANT on UNIX. + </action> <action dev="epugh" type="upgrade" due-to="Matt Raible"> - Upgrade to build 733 of Webtest. Mostly consists of updating jar files. - </action> + Upgrade to build 733 of Webtest. Mostly consists of updating jar files. + </action> <action dev="epugh" type="add"> Add the ability to supply a list of extra systemproperties (maven.webtest.sysproperties) that are passed into the Ant task. Any empty system properties will cause a prompt first to supply 1.2 +132 -132 maven-plugins/webtest/src/plugin-resources/maven-webtest-report.xsl Index: maven-webtest-report.xsl =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/webtest/src/plugin-resources/maven-webtest-report.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- maven-webtest-report.xsl 12 Oct 2004 13:24:43 -0000 1.1 +++ maven-webtest-report.xsl 9 Mar 2005 11:37:31 -0000 1.2 @@ -3,62 +3,62 @@ <xsl:output method="html"/> <!-- Variable passed from ant with the creation time --> - <xsl:param name="reporttime"/> - <xsl:param name="resources.dir" select="'./webtest'"/> + <xsl:param name="reporttime"/> + <xsl:param name="resources.dir" select="'./webtest'"/> - <xsl:template match="/"> + <xsl:template match="/"> <!-- HTML prefix --> <HTML> <HEAD> - <meta http-equiv="content-style-type" content="text/css"/> - <LINK rel="stylesheet" type="text/css" href="{$resources.dir}/css/report.css"></LINK> + <meta http-equiv="content-style-type" content="text/css"/> + <LINK rel="stylesheet" type="text/css" href="{$resources.dir}/css/report.css"></LINK> <TITLE>Canoo WebTest - Test Result Overview</TITLE> </HEAD> - <BODY> - <!-- outer holder table --> - <table border="0" width="96%" cellspacing="0" style="margin-left:10px;"> - <tr> - <td width="10"> </td> - <td> - <table border="0"> - <!-- CS Header --> - <tr > + <BODY> + <!-- outer holder table --> + <table border="0" width="96%" cellspacing="0" style="margin-left:10px;"> + <tr> + <td width="10"> </td> + <td> + <table border="0"> + <!-- CS Header --> + <tr > <td class="Topmenu1Container" > - <br/> + <br/> <H2>Canoo WebTest Report</H2> </td> - <td class="Topmenu1Container" align="right" valign="bottom"> + <td class="Topmenu1Container" align="right" valign="bottom"> Report created at <xsl:value-of select="$reporttime"/> - </td> - </tr> + </td> + </tr> - <!-- spacer --> - <tr><td>  </td></tr> + <!-- spacer --> + <tr><td>  </td></tr> <!-- Header and summary table --> <tr align="left"> - <xsl:call-template name="StepStatistics"/> + <xsl:call-template name="StepStatistics"/> </tr> <tr> - <xsl:call-template name="OverviewTable"/> - </tr> + <xsl:call-template name="OverviewTable"/> + </tr> <!-- All individual test results --> <xsl:apply-templates /> <!-- Footer & fun --> - <tr> - <td class="footer" colspan="2"> + <tr> + <td class="footer" colspan="2"> <hr/> Created using <a href="http://webtest.canoo.com">CanooWebTest</a> - </td> - </tr> - </table> - </td> - </tr> + </td> + </tr> + </table> + </td> + </tr> </table> <!-- HTML postfix --> @@ -77,9 +77,9 @@ <xsl:attribute name="name">overview</xsl:attribute> </a> <h4>Test Scenario Overview (<xsl:call-template name="time"> - <xsl:with-param name="msecs" select="$duration.total"/> - </xsl:call-template>) - </h4> + <xsl:with-param name="msecs" select="$duration.total"/> + </xsl:call-template>) + </h4> <!-- Create summary table entries choosing the td-class depending on sucsessful yes/no @@ -88,7 +88,7 @@ <table cellpadding="5" border="0" cellspacing="0"> <tr><th>No</th><th>Result</th><th>Name</th><th>Duration</th><th>%</th><th> </th><th>Graph</th></tr> <xsl:for-each select="$testresult.list"> - <xsl:variable name="actual.testspec.name" select="@testspecname"/> + <xsl:variable name="actual.testspec.name" select="@testspecname"/> <tr> <td class="light" align="right"> <xsl:number /></td> @@ -104,18 +104,18 @@ </td> <xsl:variable name="actual.testspec.name" select="@testspecname"/> <xsl:variable name="actual.testspec.duration" - select="sum(self::node()[@testspecname=$actual.testspec.name]/results/step/result/completed/@duration)"/> + select="sum(self::node()[@testspecname=$actual.testspec.name]/results/step/result/completed/@duration)"/> <td class="light" align="right"> - <xsl:call-template name="time"> - <xsl:with-param name="msecs" select="$actual.testspec.duration"/> - </xsl:call-template></td> + <xsl:call-template name="time"> + <xsl:with-param name="msecs" select="$actual.testspec.duration"/> + </xsl:call-template></td> <td class="light" align="right"> - <xsl:value-of select="round($actual.testspec.duration * 100 div $duration.total)"/></td> + <xsl:value-of select="round($actual.testspec.duration * 100 div $duration.total)"/></td> <xsl:call-template name="colorBar"> - <xsl:with-param name="percentage" select="$actual.testspec.duration * 100 div $duration.total"/> - <xsl:with-param name="color" select="'lightblue'"/> - </xsl:call-template> + <xsl:with-param name="percentage" select="$actual.testspec.duration * 100 div $duration.total"/> + <xsl:with-param name="color" select="'lightblue'"/> + </xsl:call-template> </tr> </xsl:for-each> @@ -140,28 +140,28 @@ <td class="light" ><img src="{$resources.dir}/images/ok.gif" alt="Steps which executed successfully"/></td> <td class="light" align="right"><xsl:value-of select="$steps.ok"/></td> <td class="light" align="right"><xsl:value-of select="round($steps.ok * 100 div $steps.total)"/></td> - <xsl:call-template name="colorBar"> - <xsl:with-param name="percentage" select="$steps.ok * 100 div $steps.total"/> - <xsl:with-param name="color" select="'lightgreen'"/> - </xsl:call-template> + <xsl:call-template name="colorBar"> + <xsl:with-param name="percentage" select="$steps.ok * 100 div $steps.total"/> + <xsl:with-param name="color" select="'lightgreen'"/> + </xsl:call-template> </tr> <tr> <td class="light" ><img src="{$resources.dir}/images/todo.gif" alt="Steps which failed"/></td> <td class="light" align="right"><xsl:value-of select="$steps.failed"/></td> <td class="light" align="right"><xsl:value-of select="round($steps.failed * 100 div $steps.total)"/></td> - <xsl:call-template name="colorBar"> - <xsl:with-param name="percentage" select="$steps.failed * 100 div $steps.total"/> - <xsl:with-param name="color" select="'red'"/> - </xsl:call-template> + <xsl:call-template name="colorBar"> + <xsl:with-param name="percentage" select="$steps.failed * 100 div $steps.total"/> + <xsl:with-param name="color" select="'red'"/> + </xsl:call-template> </tr><tr> <td class="light" ><img src="{$resources.dir}/images/optional.gif" alt="Steps which were not executed"/></td> <td class="light" align="right"><xsl:value-of select="$steps.else"/></td> <td class="light" align="right"><xsl:value-of select="round($steps.else * 100 div $steps.total)"/></td> - <xsl:call-template name="colorBar"> - <xsl:with-param name="percentage" select="$steps.else * 100 div $steps.total"/> - <xsl:with-param name="color" select="'yellow'"/> - </xsl:call-template> + <xsl:call-template name="colorBar"> + <xsl:with-param name="percentage" select="$steps.else * 100 div $steps.total"/> + <xsl:with-param name="color" select="'yellow'"/> + </xsl:call-template> </tr> <tr> <td class="light" ><b>Sum</b></td> @@ -240,12 +240,12 @@ </table> - </td></tr></table> + </td></tr></table> </td> </xsl:template> - <xsl:template name="histogramRow"> + <xsl:template name="histogramRow"> <xsl:param name="label"/> <xsl:param name="steps"/> <xsl:param name="duration.steps"/> @@ -258,28 +258,28 @@ <xsl:with-param name="color" select="'lightblue'"/> </xsl:call-template> </tr> - </xsl:template> + </xsl:template> - <xsl:template name="colorBar"> + <xsl:template name="colorBar"> <xsl:param name="percentage"/> <xsl:param name="color"/> - <td width="2px" class="light"> </td> - <td width="80%" class="light"> - <xsl:if test="$percentage > 0"> - <table border="0" cellpadding="0" cellspacing="0"> - <xsl:attribute name="width"> - <xsl:value-of select="concat($percentage, '%')"/> - </xsl:attribute> - <tr> - <td bgcolor="{$color}"> </td> - </tr> - </table> - </xsl:if> - </td> - </xsl:template> + <td width="2px" class="light"> </td> + <td width="80%" class="light"> + <xsl:if test="$percentage > 0"> + <table border="0" cellpadding="0" cellspacing="0"> + <xsl:attribute name="width"> + <xsl:value-of select="concat($percentage, '%')"/> + </xsl:attribute> + <tr> + <td bgcolor="{$color}"> </td> + </tr> + </table> + </xsl:if> + </td> + </xsl:template> - <xsl:template name="time"> + <xsl:template name="time"> <xsl:param name="msecs"/> <xsl:variable name="base" select="round($msecs div 1000)"/> <xsl:variable name="hours" select="floor($base div 3600)"/> @@ -289,27 +289,27 @@ test="10 > $hours">0</xsl:if><xsl:value-of select="$hours"/>:<xsl:if test="10 > $mins">0</xsl:if><xsl:value-of select="$mins"/>:<xsl:if test="10 > $secs">0</xsl:if><xsl:value-of select="$secs"/> - </xsl:template> + </xsl:template> <xsl:template match="testresult"> <xsl:variable name="testspec.name" select="@testspecname"/> - <tr><td colspan="2"> + <tr><td colspan="2"> <hr/> </td></tr> - <tr><td> + <tr><td> - <!-- general info left --> + <!-- general info left --> <!-- Header and red/green box for sucess/failure overview--> <blockquote> <a> - <xsl:attribute name="name">#testspec<xsl:number /></xsl:attribute> + <xsl:attribute name="name">testspec<xsl:number /></xsl:attribute> </a> - <H4> - <!-- the success indicator --> + <H4> + <!-- the success indicator --> <xsl:if test="@successful='no'"> <img src="{$resources.dir}/images/todo.gif"/> </xsl:if> @@ -324,22 +324,22 @@ Based on <xsl:apply-templates select="config"/> </blockquote> - </td> - </tr> + </td> + </tr> - <tr> - <td> + <tr> + <td> <!-- The test step results in sequence below --> - <xsl:apply-templates select="results"/> - </td> - </tr> - <tr> - <td colspan="2"> - <xsl:apply-templates select="results/failure"/> - <xsl:apply-templates select="results/error"/> - </td> - </tr> + <xsl:apply-templates select="results"/> + </td> + </tr> + <tr> + <td colspan="2"> + <xsl:apply-templates select="results/failure"/> + <xsl:apply-templates select="results/error"/> + </td> + </tr> <!-- Create link back to overview (top) --> <tr><td><a href="#overview">Back to Test Report Overview</a></td></tr> @@ -348,14 +348,14 @@ <!-- Individual templates --> <xsl:template match="config"> - <xsl:variable name="configHref"><xsl:value-of - select="parameter[@name='protocol']/@value"/>://<xsl:value-of - select="parameter[@name='host']/@value"/>:<xsl:value-of - select="parameter[@name='port']/@value"/>/<xsl:value-of - select="parameter[@name='basepath']/@value"/>/</xsl:variable> - <a><xsl:attribute name="href"><xsl:value-of select="$configHref"/></xsl:attribute> - <xsl:attribute name="target">_new</xsl:attribute> - <xsl:value-of select="$configHref"/></a> + <xsl:variable name="configHref"><xsl:value-of + select="parameter[@name='protocol']/@value"/>://<xsl:value-of + select="parameter[@name='host']/@value"/>:<xsl:value-of + select="parameter[@name='port']/@value"/>/<xsl:value-of + select="parameter[@name='basepath']/@value"/>/</xsl:variable> + <a><xsl:attribute name="href"><xsl:value-of select="$configHref"/></xsl:attribute> + <xsl:attribute name="target">_new</xsl:attribute> + <xsl:value-of select="$configHref"/></a> </xsl:template> <xsl:template match="parameter[@name='resultfilename']"> @@ -420,7 +420,7 @@ <tr> <td align="right" class="light"><b> <xsl:number/></b></td> </tr> - <xsl:if test="parameter[@name='stepType'][@value='group']"> + <xsl:if test="parameter[@name='stepType'][@value='group']"> <tr> <td align="right"> <img> @@ -441,10 +441,10 @@ <td style="border-bottom:1px inset black;" valign="top" class="light"> <table cellpadding="0" cellspacing="0"> - <tr> - <td nowrap="true"><b><xsl:value-of select="parameter[@name='stepType']/@value"/></b></td></tr> - <tr> - <td> + <tr> + <td nowrap="true"><b><xsl:value-of select="parameter[@name='stepType']/@value"/></b></td></tr> + <tr> + <td> <!-- zeige nicht title unknown--> <xsl:if test="parameter[@name='stepId']/@value='<unknown>'">   @@ -453,62 +453,62 @@ <xsl:value-of select="parameter[@name='stepId']/@value"/> </xsl:if> </td></tr> - <xsl:apply-templates select="parameter[@name='resultfilename']"/> + <xsl:apply-templates select="parameter[@name='resultfilename']"/> </table> </td> <td style="border-bottom:1px inset black;" valign="top" class="light"> - <table cellpadding="2" cellspacing="0"> + <table cellpadding="2" cellspacing="0"> <xsl:apply-templates select="parameter[@name!='stepType' and @name!='stepId' and @name!='resultfilename']"/> - </table> - <!-- Write new table for contained steps (if any) --> - <xsl:if test="count(step) > 0"> - <xsl:call-template name="renderStepTable" /> - </xsl:if> - </td> + </table> + <!-- Write new table for contained steps (if any) --> + <xsl:if test="count(step) > 0"> + <xsl:call-template name="renderStepTable" /> + </xsl:if> + </td> <td style="border-bottom:1px inset black;" valign="top" align="right" class="light"> <xsl:value-of select="result/completed/@duration"/></td> - </tr> + </tr> </xsl:template> <xsl:template name="renderStepTable"> - <table cellpadding="3" cellspacing="0"> - <tr><th>No</th><th>Result</th><th>Name</th><th>Parameter</th><th>Duration</th></tr> - <xsl:apply-templates select="step"/> + <table cellpadding="3" cellspacing="0"> + <tr><th>No</th><th>Result</th><th>Name</th><th>Parameter</th><th>Duration</th></tr> + <xsl:apply-templates select="step"/> </table> </xsl:template> <xsl:template match="result"> <xsl:if test="completed"> - <td style="border-bottom:1px inset black;" class="light" align="center"> + <td style="border-bottom:1px inset black;" class="light" align="center"> <!-- ###################################################################### --> <!-- tj: set status of a step of type 'group' to 'failed' if one of its nested steps fails --> <!-- tj: set status to 'ok' if step is not of type 'group' or if all substeps of a step of type 'group' have been executed successfully. --> - <xsl:if test="preceding-sibling::*[@name='stepType'][@value='group']/following-sibling::step/result/failed"> + <xsl:if test="preceding-sibling::*[@name='stepType'][@value='group']/following-sibling::step/result/failed"> <img src="{$resources.dir}/images/todo.gif"/> - </xsl:if> - <xsl:if test="not(preceding-sibling::*[@name='stepType'][@value='group']/following-sibling::step/result/failed)"> + </xsl:if> + <xsl:if test="not(preceding-sibling::*[@name='stepType'][@value='group']/following-sibling::step/result/failed)"> <img src="{$resources.dir}/images/ok.gif"/> - </xsl:if> + </xsl:if> <!-- ###################################################################### --> - </td> + </td> </xsl:if> <xsl:if test="failed"> - <td style="border-bottom:1px inset black;" class="light" align="center"> + <td style="border-bottom:1px inset black;" class="light" align="center"> <img src="{$resources.dir}/images/todo.gif"/><br/> - <a> + <a> <xsl:attribute name="href">#error<xsl:number count="testresult"/></xsl:attribute> <font size="-10"> Error </font> </a> - </td> + </td> </xsl:if> <xsl:if test="notexecuted"> <td style="border-bottom:1px inset black;" class="light" align="center"> <img src="{$resources.dir}/images/optional.gif"/> - </td> + </td> </xsl:if> </xsl:template> @@ -535,13 +535,13 @@ <h3>Exception</h3> <xsl:value-of select="@exception"/> - <h3>Exception</h3> + <h3>Exception</h3> <xsl:value-of select="@message"/> - <h3>Stacktrace</h3> - <PRE> + <h3>Stacktrace</h3> + <PRE> <xsl:value-of select="text()" disable-output-escaping="no"/> - </PRE> + </PRE> </xsl:template> |