I did figure it out, at last :) Here is how to fix it in a basic archetype:
- Obtain the Webtest resources, containing images, css etc. These can be found in any webtest release (in the resources directory), and I've also repacked them to a .zip file, temporarly available at: http://www.cs.umu.se/~c03dhn/webtest-resources.zip - If you are using the resources from a Webtest release, copy the files from the resource directory to src/test/resources/webtest/ - If you downloaded my repacked .zip archieve, just unzip the archieve in your project directory and the files will be extracted to the underlying src/test/resources/webtest directory. - Add the following target to your web-tests.xml file: <!-- Style the resulting .xml file, store as html --> <target name="style" description="generates the html report from the xml"> <tstamp> <format property="report.time" pattern="dd.MM.yyyy HH:mm" locale="en"/> </tstamp> <!--The webtest resource directory --> <property name="webtest.resources.dir" location="src/test/resources/webtest/"/> <!-- Name of the output file --> <property name="webtest.resultfile.html" value="webtestsreport.html"/> <!-- Name of the result .xml --> <property name="webtest.resultfile" value="web-tests-result.xml"/> <!-- Name of the directory where the web-test-result.xml is. --> <property name="webtest.resultpath" location="target/webtest-data/"/> <!-- output html to same directory --> <property name="webtest.outputdir" location="${webtest.resultpath}"/> <!-- Webtest settings --> <property name="webtest.style.title" value="Canoo WebTest Reporting"/> <property name="webtest.style.singleReportsMode" value="embedded"/> <!-- the XML stylesheet path--> <property name="webtest.style.xsl" location="${webtest.resources.dir}/WebTestReport.xsl"/> <!-- apply the style --> <style in="${webtest.resultpath}/${webtest.resultfile}" out="${webtest.resultpath}/${webtest.resultfile.html}" style="${webtest.style.xsl}" > <!-- 'external' or 'embedded' --> </style> <!-- create the resource dir, storing images, css etc. --> <mkdir dir="${webtest.resultpath}/resources"/> <!-- populate the resource dir --> <copy todir="${webtest.resultpath}/resources"> <fileset dir="${webtest.resources.dir}" /> </copy> </target> - Add 'style' as a dependency to run-all-tests by finding the line starting with: <target name="run-all-tests" ... and add 'style' as the last dependency. Voilá! this should produce a fancy "webtestresults.html" file in your target/webtest-data directory after the tests has been run. I have yet to figure out how to make webtest continue despite failing a test. Without that, the style 'test' will never be run, making it somewhat useless since only successful tests will be shown :P Perhaps someone already know how to fix this? I realize web-tests.xml is a semantically unsuitable place for this target, but my ant (and appfuse) skills are still very limited, so moving this code to a more suitable location is probably a good idea. If you're using a modular achetype, the directory paths will probably be illegal. //Seto, trial & error wizard mraible wrote: > > I agree it'd be awesome to have: > > http://issues.appfuse.org/browse/APF-912 > > The reason it doesn't exist is I haven't had time to look into doing > it. If you figure it out, we'd love your help! > > Matt > > On 11/2/07, Setomidor <[EMAIL PROTECTED]> wrote: >> >> Sooner or later, messing with appfuse will result in some of the >> integration-tests failing. Now, I know there should be a nice fancy >> webtestresults.html file like the one showed at: >> >> http://webtest.canoo.com/webtest/manual/images/TestResult_GoogleWebTestTop.png >> >> But I can't manage to find how to turn the rendering of this page on :) I >> can find the webtestresults.xml file, under target/web-test/ (or >> something >> similar), but the .html file is not generated. >> >> Two questions: >> >> 1) how to turn it on? >> >> 2) Why is it not turned on by default in appfuse? It's really a great >> tool >> once things start to go haywire. >> >> Thanks! >> >> //Seto >> -- >> View this message in context: >> http://www.nabble.com/How-to-generate-webtestresults.html--tf4737303s2369.html#a13547266 >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-to-generate-webtestresults.html--tf4737303s2369.html#a13586182 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
