From: Siegfried G. <wd...@us...> - 2004-10-12 13:26:04
|
wdsgoe 04/10/12 06:24:45 Added: webtest/src/plugin-resources webtestTaskdefs.properties maven-webtest-report.xsl BuildNumber.txt webtest/webtest webtest.xml red_test.xml green_test.xml webtest/src/plugin-resources/images todo.gif optional.gif ok.gif webtest/src/plugin-resources/css report.css webtest/src/plugin-resources/classes log4j.properties webtest/xdocs goals.xml Log: Preparing release 0.9.1 Revision Changes Path 1.1 maven-plugins/webtest/src/plugin-resources/webtestTaskdefs.properties Index: webtestTaskdefs.properties =================================================================== testSpec=com.canoo.webtest.ant.TestSpecificationTask config=com.canoo.webtest.engine.Configuration steps=com.canoo.webtest.ant.TestStepSequence followframe=com.canoo.webtest.steps.request.FollowFrame clickbutton=com.canoo.webtest.steps.request.ClickButton clicklink=com.canoo.webtest.steps.request.ClickLink verifyxpath=com.canoo.webtest.steps.verify.VerifyXPath verifylinks=com.canoo.webtest.steps.verify.VerifyLinks verifycheckbox=com.canoo.webtest.steps.verify.VerifyCheckbox invoke=com.canoo.webtest.steps.request.InvokePage setinputfield=com.canoo.webtest.steps.SetInputField setselectfield=com.canoo.webtest.steps.SetSelectField setcheckbox=com.canoo.webtest.steps.SetCheckbox verifyelement=com.canoo.webtest.steps.verify.VerifyHtmlElementNamed verifyelementtext=com.canoo.webtest.steps.verify.VerifyElementText verifyinputfield=com.canoo.webtest.steps.verify.VerifyInputField verifyselectfield=com.canoo.webtest.steps.verify.VerifySelectField verifytext=com.canoo.webtest.steps.verify.VerifyText verifytextarea=com.canoo.webtest.steps.verify.VerifyElementText verifytitle=com.canoo.webtest.steps.verify.VerifyTitle storeregex=com.canoo.webtest.steps.StoreRegExMatch storexpath=com.canoo.webtest.steps.StoreXPath previousresponse=com.canoo.webtest.steps.PreviousResponse not=com.canoo.webtest.ant.NotStep repeat=com.canoo.webtest.ant.RepeatStep new_setinputfield=com.canoo.webtest.steps.form.SetTextField new_setselectfield=com.canoo.webtest.steps.form.SetSelectField new_setcheckbox=com.canoo.webtest.steps.form.SetCheckbox new_setradiobutton=com.canoo.webtest.steps.form.SetRadioButton new_selectform=com.canoo.webtest.steps.form.SelectForm decryptPdfDocument=com.canoo.webtest.steps.pdftest.DecryptPdfDocumentStep verifyPdfEncryption=com.canoo.webtest.steps.pdftest.VerifyPdfDocumentEncryptedStep verifyPdfEncryptionStrength=com.canoo.webtest.steps.pdftest.VerifyPdfDocumentEncryptionStrengthStep verifyPdfEncryptProperty=com.canoo.webtest.steps.pdftest.VerifyPdfEncryptPropertyStep verifyPdfTitle=com.canoo.webtest.steps.pdftest.VerifyPdfDocumentTitleStep verifyPdfInfoProperty=com.canoo.webtest.steps.pdftest.VerifyPdfInfoPropertyStep verifyPdfPageCount=com.canoo.webtest.steps.pdftest.VerifyPdfNumberOfPagesStep verifyPdfFieldCount=com.canoo.webtest.steps.pdftest.VerifyPdfNumberOfFieldsStep verifyPdfField=com.canoo.webtest.steps.pdftest.VerifyPdfFieldStep verifyPdfTextField=com.canoo.webtest.steps.pdftest.VerifyPdfTextFieldStep verifyPdfCheckboxField=com.canoo.webtest.steps.pdftest.VerifyPdfCheckboxFieldStep verifyPdfReadOnlyField=com.canoo.webtest.steps.pdftest.VerifyPdfReadOnlyFieldStep verifyPdfText=com.canoo.webtest.steps.pdftest.VerifyPdfTextStep # extension (steps provided as it, without functional tests) myCustomStep=com.canoo.webtest.extension.MyCustomStep relayToBrowser=com.canoo.webtest.extension.RelayToBrowser storeDynamicProperty=com.canoo.webtest.extension.StoreDynamicPropertyStep group=com.canoo.webtest.extension.GroupStep setfilefield=com.canoo.webtest.extension.SetFileField 1.1 maven-plugins/webtest/src/plugin-resources/maven-webtest-report.xsl Index: maven-webtest-report.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <!-- Variable passed from ant with the creation time --> <xsl:param name="reporttime"/> <xsl:param name="resources.dir" select="'./webtest'"/> <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> <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 > <td class="Topmenu1Container" > <br/> <H2>Canoo WebTest Report</H2> </td> <td class="Topmenu1Container" align="right" valign="bottom"> Report created at <xsl:value-of select="$reporttime"/> </td> </tr> <!-- spacer --> <tr><td>  </td></tr> <!-- Header and summary table --> <tr align="left"> <xsl:call-template name="StepStatistics"/> </tr> <tr> <xsl:call-template name="OverviewTable"/> </tr> <!-- All individual test results --> <xsl:apply-templates /> <!-- Footer & fun --> <tr> <td class="footer" colspan="2"> <hr/> Created using <a href="http://webtest.canoo.com">CanooWebTest</a> </td> </tr> </table> </td> </tr> </table> <!-- HTML postfix --> </BODY> </HTML> </xsl:template> <xsl:template name="OverviewTable"> <xsl:variable name="testresult.list" select="summary/testresult"/> <xsl:variable name="duration.total" select="sum(//testresult/results/step/result/completed/@duration)"/> <td valign="top"> <a> <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> <!-- Create summary table entries choosing the td-class depending on sucsessful yes/no and create a link to the appropriate detail section (e.g. #testspec1). --> <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"/> <tr> <td class="light" align="right"> <xsl:number /></td> <td class="light" align="center"> <xsl:if test="@successful='no'"><img src="{$resources.dir}/images/todo.gif"/></xsl:if> <xsl:if test="@successful='yes'"><img src="{$resources.dir}/images/ok.gif"/></xsl:if> </td> <td class="light" nowrap="true"> <a> <xsl:attribute name="href">#testspec<xsl:number /></xsl:attribute> <xsl:value-of select="@testspecname"/> </a> </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)"/> <td class="light" align="right"> <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: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> </tr> </xsl:for-each> </table> </td> </xsl:template> <xsl:template name="StepStatistics"> <td valign="top" > <table cellpadding="0" border="0" cellspacing="2" width="100%"><tr><td valign="top" width="50%"> <H4>Result Summary</H4> <xsl:variable name="steps.total" select="count(//results/step)"/> <xsl:variable name="steps.ok" select="count(//results/step/result/completed)"/> <xsl:variable name="steps.failed" select="count(//results/step/result/failed)"/> <xsl:variable name="steps.else" select="count(//results/step/result/notexecuted)"/> <table cellpadding="3" border="0" cellspacing="0"> <tr><th align="right">Result</th><th align="right">#</th><th align="right">%</th><th> </th><th>Graph</th></tr> <tr> <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> </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> </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> </tr> <tr> <td class="light" ><b>Sum</b></td> <td class="light" align="right"><b> <xsl:value-of select="$steps.total"/></b></td> <td class="light" align="right"><b> 100</b></td> <td class="light" > </td> <td class="light" > </td> </tr> </table> </td><td valign="top"> <H4>Server Roundtrip Timing Profile</H4> <!-- ================================ server roundtrip statistic table ============================= --> <xsl:variable name="invoke.steps" select="//results/step[parameter[@name='stepType'][@value='invoke']]"/> <xsl:variable name="clicklink.steps" select="//results/step[parameter[@name='stepType'][@value='clicklink']]"/> <xsl:variable name="clickbutton.steps" select="//results/step[parameter[@name='stepType'][@value='clickbutton']]"/> <xsl:variable name="duration.steps" select="$invoke.steps | $clicklink.steps | $clickbutton.steps"/> <xsl:variable name="last.steps" select="count($duration.steps/result/completed[@duration > 30000])"/> <xsl:variable name="third.steps" select="count($duration.steps/result/completed[@duration > 10000][30000 >= @duration])"/> <xsl:variable name="second.steps" select="count($duration.steps/result/completed[@duration > 5000][10000 >= @duration])"/> <xsl:variable name="first.steps" select="count($duration.steps/result/completed[@duration > 1000][5000 >= @duration])"/> <xsl:variable name="begin.steps" select="count($duration.steps/result/completed[1000 >= @duration])"/> <table cellpadding="3" border="0" cellspacing="0"> <tr><th align="center">Secs</th><th align="right">#</th><th align="right">%</th><th> </th><th>Histogram</th></tr> <xsl:call-template name="histogramRow"> <xsl:with-param name="label">  0 -  1 </xsl:with-param> <xsl:with-param name="steps" select="$begin.steps" /> <xsl:with-param name="duration.steps" select="$duration.steps"/> </xsl:call-template> <xsl:call-template name="histogramRow"> <xsl:with-param name="label">  1 -  5 </xsl:with-param> <xsl:with-param name="steps" select="$first.steps" /> <xsl:with-param name="duration.steps" select="$duration.steps"/> </xsl:call-template> <xsl:call-template name="histogramRow"> <xsl:with-param name="label">  5 - 10 </xsl:with-param> <xsl:with-param name="steps" select="$second.steps" /> <xsl:with-param name="duration.steps" select="$duration.steps"/> </xsl:call-template> <xsl:call-template name="histogramRow"> <xsl:with-param name="label"> 10 - 30 </xsl:with-param> <xsl:with-param name="steps" select="$third.steps" /> <xsl:with-param name="duration.steps" select="$duration.steps"/> </xsl:call-template> <xsl:call-template name="histogramRow"> <xsl:with-param name="label">    > 30 </xsl:with-param> <xsl:with-param name="steps" select="$last.steps" /> <xsl:with-param name="duration.steps" select="$duration.steps"/> </xsl:call-template> <tr> <td class="light" ><b>Sum</b></td> <td class="light" align="right"><b> <xsl:value-of select="count($duration.steps)"/></b></td> <td class="light" align="right"><b> 100</b></td> <td class="light" > </td> <td class="light" > </td> </tr> <tr> <td class="light" ><b>Avg</b></td> <td class="light" align="right"><b> </b></td> <td class="light" align="right"><b> </b></td> <td class="light" > </td> <td class="light" ><b> <xsl:value-of select="round(sum($duration.steps/result/completed/@duration) div 1000 div count($duration.steps))"/></b></td> </tr> </table> </td></tr></table> </td> </xsl:template> <xsl:template name="histogramRow"> <xsl:param name="label"/> <xsl:param name="steps"/> <xsl:param name="duration.steps"/> <tr> <td class="light" nowrap="true"> <xsl:value-of select="$label"/> </td> <td class="light" align="right"><xsl:value-of select="$steps"/></td> <td class="light" align="right"><xsl:value-of select="round($steps * 100 div count($duration.steps))"/></td> <xsl:call-template name="colorBar"> <xsl:with-param name="percentage" select="$steps * 100 div count($duration.steps)"/> <xsl:with-param name="color" select="'lightblue'"/> </xsl:call-template> </tr> </xsl:template> <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> <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)"/> <xsl:variable name="mins" select="floor(($base - $hours*3600) div 60)"/> <xsl:variable name="secs" select="floor(($base - $hours*3600) - $mins*60)"/> <xsl:if 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 match="testresult"> <xsl:variable name="testspec.name" select="@testspecname"/> <tr><td colspan="2"> <hr/> </td></tr> <tr><td> <!-- general info left --> <!-- Header and red/green box for sucess/failure overview--> <blockquote> <a> <xsl:attribute name="name">#testspec<xsl:number /></xsl:attribute> </a> <H4> <!-- the success indicator --> <xsl:if test="@successful='no'"> <img src="{$resources.dir}/images/todo.gif"/> </xsl:if> <xsl:if test="@successful='yes'"> <img src="{$resources.dir}/images/ok.gif"/> </xsl:if>   <xsl:value-of select="$testspec.name"/> </H4> Test started at <xsl:value-of select="@starttime"/><br/> Based on <xsl:apply-templates select="config"/> </blockquote> </td> </tr> <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> <!-- Create link back to overview (top) --> <tr><td><a href="#overview">Back to Test Report Overview</a></td></tr> </xsl:template> <!-- 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:template> <xsl:template match="parameter[@name='resultfilename']"> <tr> <td colspan="2"> <a> <xsl:attribute name="href"> <xsl:text>webtest/response/</xsl:text><xsl:value-of select="@value"/> </xsl:attribute> <xsl:attribute name="target">_new</xsl:attribute> Resulting page </a> </td> </tr> </xsl:template> <xsl:template match="parameter"> <tr> <!-- do not show regegex='false' --> <xsl:if test="@name='regex'"> <xsl:if test="@value='false'"> <td class="light"> </td> <td class="light"> </td> </xsl:if> <xsl:if test="@value!='false'"> <td class="light"><b><xsl:value-of select="@name"/></b></td> <td class="light"><xsl:value-of select="@value"/></td> </xsl:if> </xsl:if> <xsl:if test="@name!='regex'"> <!-- zeige nicht 'null' --> <td class="light"><b><xsl:value-of select="@name"/></b></td> <td class="light"> <xsl:if test="@name='text'"> <xsl:if test="@value='null'"> </xsl:if> <xsl:if test="@value!='null'"><xsl:value-of select="@value"/></xsl:if> </xsl:if> <xsl:if test="@name!='text'"> <xsl:value-of select="@value"/> </xsl:if> </td> </xsl:if> </tr> </xsl:template> <xsl:template match="results"> <xsl:if test="count(step) > 0"> <table cellpadding="3" border="0" 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:if> </xsl:template> <xsl:template match="step"> <tr> <!-- ###################################################################### --> <!-- tj: create image to show/hide substeps if row contains substeps and add onclick and groupStep attribute to image --> <!-- td class="light" style="border-bottom:1px inset black;"> <table cellspacing="0" cellpadding="0" align="right"> <tr> <td align="right" class="light"><b> <xsl:number/></b></td> </tr> <xsl:if test="parameter[@name='stepType'][@value='group']"> <tr> <td align="right"> <img> <xsl:attribute name="onclick">changeLevelOfDetailForGroup(this)</xsl:attribute> <xsl:attribute name="groupStep">true</xsl:attribute> <xsl:attribute name="src">./images/more.gif</xsl:attribute> </img> </td> </tr> </xsl:if> </table> </td --> <!-- ###################################################################### --> <xsl:apply-templates select="result"/> <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> <!-- zeige nicht title unknown--> <xsl:if test="parameter[@name='stepId']/@value='<unknown>'">   </xsl:if> <xsl:if test="parameter[@name='stepId']/@value!='<unknown>'"> <xsl:value-of select="parameter[@name='stepId']/@value"/> </xsl:if> </td></tr> <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"> <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> <td style="border-bottom:1px inset black;" valign="top" align="right" class="light"> <xsl:value-of select="result/completed/@duration"/></td> </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> </xsl:template> <xsl:template match="result"> <xsl:if test="completed"> <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"> <img src="{$resources.dir}/images/todo.gif"/> </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> <!-- ###################################################################### --> </td> </xsl:if> <xsl:if test="failed"> <td style="border-bottom:1px inset black;" class="light" align="center"> <img src="{$resources.dir}/images/todo.gif"/><br/> <a> <xsl:attribute name="href">#error<xsl:number count="testresult"/></xsl:attribute> <font size="-10"> Error </font> </a> </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> </xsl:if> </xsl:template> <xsl:template match="failure"> <a> <xsl:attribute name="name">error<xsl:number count="testresult"/></xsl:attribute> <h2>Failure</h2> </a> <h3>Message</h3> <xsl:value-of select="@message"/> <br/><br/> </xsl:template> <xsl:template match="error"> <a> <xsl:attribute name="name">error<xsl:number count="testresult"/></xsl:attribute> <h2>Error</h2> </a> <h3>Exception</h3> <xsl:value-of select="@exception"/> <h3>Exception</h3> <xsl:value-of select="@message"/> <h3>Stacktrace</h3> <PRE> <xsl:value-of select="text()" disable-output-escaping="no"/> </PRE> </xsl:template> </xsl:stylesheet> 1.1 maven-plugins/webtest/src/plugin-resources/BuildNumber.txt Index: BuildNumber.txt =================================================================== 457 1.1 maven-plugins/webtest/webtest/webtest.xml Index: webtest.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <project name="Sample Master Test" basedir="." default="all"> <!-- | | Add additional targets here | --> <target name="all" > <ant antfile="green_test.xml" dir="."/> <!-- ant antfile="red_test.xml" dir="."/ --> </target> </project> 1.1 maven-plugins/webtest/webtest/red_test.xml Index: red_test.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE project [ <!ENTITY init SYSTEM "modules/set.init.txt"> <!ENTITY config SYSTEM "modules/set.config.txt"> ]> <project name="Canoo Webtest Sample" basedir="." default="all"> <!-- Load configuration data from properties --> <property file="config/sample.properties"/> <!-- Initialize Canoo WebTest --> &init; <!-- | | Add additional targets here | --> <target name="all" > <antcall target="RedTest"/> </target> <!-- | | Cruise around the Jakarta site (well, not too much) | --> <target name="RedTest" > <testSpec name="RedTest" > &config; <steps> <invoke stepid="Go to the JAKARTA home page" url="${red.url}" /> </steps> </testSpec> </target> </project> 1.1 maven-plugins/webtest/webtest/green_test.xml Index: green_test.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE project [ <!ENTITY init SYSTEM "modules/set.init.txt"> <!ENTITY config SYSTEM "modules/set.config.txt"> ]> <project name="Canoo Webtest Sample" basedir="." default="all"> <!-- Load configuration data from properties --> <property file="config/sample.properties"/> <!-- Initialize Canoo WebTest --> &init; <!-- | | Add additional targets here | --> <target name="all" > <antcall target="GreenTest"/> </target> <!-- | | Cruise around the Jakarta site (well, not too much) | --> <target name="GreenTest" > <testSpec name="GreenTest" > &config; <steps> <invoke stepid="Go to the JAKARTA home page" url="${green.url}" /> </steps> </testSpec> </target> </project> 1.1 maven-plugins/webtest/src/plugin-resources/images/todo.gif <<Binary file>> 1.1 maven-plugins/webtest/src/plugin-resources/images/optional.gif <<Binary file>> 1.1 maven-plugins/webtest/src/plugin-resources/images/ok.gif <<Binary file>> 1.1 maven-plugins/webtest/src/plugin-resources/css/report.css Index: report.css =================================================================== BODY { BACKGROUND-COLOR: #ffffff } TABLE { COLOR: #000000 } TH { FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0in; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #e1e1e1 } P { FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif } TR { FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif } TR .params{ FONT-SIZE: 8pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif } TD { FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif } TD.red { FONT-WEIGHT: bold; BACKGROUND-COLOR: #ff0000; text-align : center; vertical-align : middle; color : White; } TD.green { FONT-WEIGHT: bold; BACKGROUND-COLOR: #00ff00; text-align : center; vertical-align : middle; color : White; } TD.normal { FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffffff; text-align : center; vertical-align : middle; color : Black; } TD.boldgreen { FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #00ff00; text-align : center; vertical-align : middle; color : White; } TD.boldred { FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #ff0000; text-align : center; vertical-align : middle; color : White; } TD.tocgreen { BACKGROUND-COLOR: #00ff00; } TD.tocred { BACKGROUND-COLOR: #ff0000; } TD.footer { FONT-STYLE: italic; text-align : right; color : blue; } TD.paramname { text-align : right; color : Green; margin-right : 16px; vertical-align : top; } TD.stepname { color : Green; text-transform : uppercase; } PRE { FONT-SIZE: 8pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: "Courier New", Courier, mono; WHITE-SPACE: pre } H2 { FONT-WEIGHT: bold; FONT-SIZE: 20px; FONT-FAMILY: Arial, Helvetica, sans-serif } H3 { FONT-WEIGHT: bold; FONT-SIZE: 16px; FONT-FAMILY: Arial, Helvetica, sans-serif } A.result{ FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif; color : White; } A.toc{ FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: 0in; FONT-FAMILY: Arial, Helvetica, sans-serif; color : White; text-align : left; } 1.1 maven-plugins/webtest/src/plugin-resources/classes/log4j.properties Index: log4j.properties =================================================================== ## standard way of logging log4j.rootCategory=WARN, stdout ## log all the https specifics # log4j.logger.com.canoo.webtest.security=debug ## log debug information about connection calls # log4j.logger.com.canoo.webtest.steps.request=debug # log4j.logger.com.canoo.webtest.engine.Context=debug # log4j.logger.com.canoo.webtest.steps.pdftest=debug ## log what httpunit is doing, helpful to debug http header relay # log4j.logger.com.meterware.httpunit=debug log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout ## Pattern to output the caller's file name and line number. ## find description of format under ## http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html ## log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n 1.1 maven-plugins/webtest/xdocs/goals.xml Index: goals.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document> <properties> <title>Maven Canoo WebTest Plug-in Goals</title> <author email="sie...@it...">Siegfried Goeschl</author> </properties> <body> <goals> <goal> <name>webtest</name> <description> The all inclusive target doing everything </description> </goal> <goal> <name>webtest:info</name> <description> Prints configuration information </description> </goal> <goal> <name>webtest:test</name> <description> Runs the Canoo WebTests </description> </goal> <goal> <name>webtest:generate-test-report</name> <description> Transforms the Canoo Webtest results into HTML </description> </goal> <goal> <name>webtest:clean</name> <description> Removes temporary webtest files </description> </goal> <goal> <name>webtest:loop</name> <description> Executes the webtest until it fails </description> </goal> </goals> </body> </document> |