You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jacqui Guerrero <jg...@purisma.com> on 2004/04/29 18:35:41 UTC

Current date and time

Hi,

 

I am using the jmeter-results-report.xsl for 2.0 and have tried to find
a way to insert the date and time when in the generated HTML report.  I
found some information on doing this using EXSLT but it doesn't seem to
work with my configuration.  I also wrote a javascript function that
will generate the date, but it seems that calling new Date() in my
javascript function causes the date displayed to change everytime the
HTML report is opened.  I need to include the date and time that the
report was generated since this would be close to when the test was run.

 

Does anyone know of a way either via XSL or JMeter to generate a
timestamp for the generated HTML report?

Thanks,
Jacqui


Re: Current date and time

Posted by ic...@cauni.de.
Hi,

first of all, my english isn't the best, :-), but i try to answer your
question:

The first thing is, to go into the jmeter.properties and add this line:
 jmeter.save.saveservice.timestamp_format=dd.MM.yyyy HH:mm:ss

Adding this line takes effect, that jmeter generate a "normal" timestamp
in the result XML file.

Now you must change the jmeter-results-report.xsl. Perhaps you can do this
like my way:

<h1>Date: <xsl:value-of
select="substring(/testResults/sampleResult/@timeStamp,1,11)"/></h1>
	<h1>Time: <xsl:value-of
select="substring(/testResults/sampleResult/@timeStamp,11)"/></h1>
Insert this into the body of the xslt File, so you in the result html file
the time and date inserted.

Best regards,
Carsten
> Hi,
>
>
>
> I am using the jmeter-results-report.xsl for 2.0 and have tried to find
> a way to insert the date and time when in the generated HTML report.  I
> found some information on doing this using EXSLT but it doesn't seem to
> work with my configuration.  I also wrote a javascript function that
> will generate the date, but it seems that calling new Date() in my
> javascript function causes the date displayed to change everytime the
> HTML report is opened.  I need to include the date and time that the
> report was generated since this would be close to when the test was run.
>
>
>
> Does anyone know of a way either via XSL or JMeter to generate a
> timestamp for the generated HTML report?
>
> Thanks,
> Jacqui
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org