[Webtest] Change to display test file name and line in reports

Marc Guillemot webtest@lists.canoo.com
Wed, 24 Sep 2003 17:34:57 +0200

I'm missing in the test reports an indication of the location of the test script 
(which file at which line). I think this is really usefull when the number of 
tests increases.
I've performed a small change in
com.canoo.webtest.reporting.addResultAttributes(Element resultElement)
(line 179 in build 365)

List steps = fResult.getContext().getTestSpecification().getUserTestSteps();
addNewAttribute(resultElement, "starttime", ((Step) 

List steps = fResult.getContext().getTestSpecification().getUserTestSteps();
Step firstStep = (Step) steps.get(0);
addNewAttribute(resultElement, "location", firstStep.getLocation().toString());
addNewAttribute(resultElement, "starttime", firstStep.getStarted().toString());

this allows to have in the xml file something like:

   endtime="Wed Sep 24 16:51:57 CEST 2003"
         starttime="Wed Sep 24 16:51:51 CEST 2003"
         successful="yes" testspecname="add contact to institution">

This is not exactly the location of the <testSpec> opening tag as it seems it 
would need more changes to the current code, but it allows already to get an 
information on the location that can be formatted by the xslt.