[Webtest] HTML test report

Frank Langanke webtest@lists.canoo.com
Thu, 06 Apr 2006 15:42:57 +0200


Petter Måhlén wrote:
> Hi,
> 
> I'm sure this is some easy thing that I am overlooking, but I have spent a
> couple of hours on trying to figure out how to produce a report of the test
> results that looks something like the one on
> http://webtest.canoo.com/webtest/reports/selftest/WebTestReport.html. Is it
> possible to do this automatically, and if so, how do I do it?
> 
> Thanks,
> 
> Petter
> 
> Cell: +46 704 40 30 25
> Direct: +46 8 442 75 95
> Fax: +46 8 24 05 08
> www.jadestone.se
> Björns Trädgårdsgränd 1, 116 21 Stockholm, Sweden
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest

Hi Petter,

I assume you're using ant to define and run your tests.

1) You have to set the attributes "summary" and "saveresponse" in your 
config-task to true.

2) Copy the target "formatResults" from 
{webtest.home}/ressources/webtestsRunner.xml to your ant-buildfile. You 
have to set the used properties to your setup.

	<property name="webtest.config.resultpath" 
value="${webtest.testdir}/webtest-results"/>
	<property name="webtest.config.resultfile" value="results.xml"/>
	<property name="webtest.config.resultfile.html" 
value="${webtest.config.resultpath}/results.html"/>

3) Execute the target. It should convert the results.xml to a 
result.html looking like the one you asked for.

Bye,

Frank.