[Webtest] Calculating Time to run Test
Denis N. Antonioli
Thu, 27 Apr 2006 09:23:51 +0200
On 26 avr. 06, at 21:35, Cynthia A Reece wrote:
> I wanted to modify the reportFromSummary.xsl file to output the
> time taken
> to complete a test.
The standard xsl for webtest displays the total time for the
execution of a <webtest>.
> I had hoped to do this using the <xsl:call-template
> function but the date format of the starttime and endtime elements in
> testresult don't seem to be in a format I can easily parse.
The standard xsl does it by summing up the step/result/xxx/@duration
contained steps, which is a counted in seconds. xxx is either
completed or failed.
This expression compute the duration of all the webtest from the report
result/node()[name()='completed' or name()='failed']/@duration)"/>
But it is easy to restrict to a single <webtest> by selecting its name:
results/step/result/node()[name()='completed' or name()='failed']/
There is also an xsl template to format the result in h:m:s
Binaries may die but source code lives forever.
-- The Halloween Document