jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: What is the preffered way to detect that a test has ended and cleanup has completed?
Date Mon, 19 Mar 2012 15:31:33 GMT
On 19 March 2012 13:51, Mark Collin <mark.collin@lazeryattack.com> wrote:
> I'm trying to programmatically determine that a test has finished before
> processing the JMeter logs.

In that case, write the code so it calls the JMeter main() entry point
and continue when that returns.
Or use a script that runs JMeter in non-GUI and then your code.

> The test listener I create tells me that a test has finished, but I need to
> wait for clean-up to complete so that the listener that writes to the .jtl
> file has finished what it's doing.

What you are asking for does not exist in the JMeter code.

All the listeners and hooks etc. are designed for code that runs as
part of a test.

>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: 19 March 2012 12:39
> To: dev@jmeter.apache.org
> Subject: Re: What is the preffered way to detect that a test has ended and
> cleanup has completed?
>
> On 19 March 2012 11:52, Mark Collin <mark.collin@lazeryattack.com> wrote:
>> This is causing me a few issues.
>>
>>
>>
>> I've tried adding a test listener which detects the end of the test,
>> the problem is that I don't know when clean-up has completed and
>> things like the reporting listener have completed their job(s).
>>
>
> What are you trying to achieve?
>
>>
>> I am currently doing the following:
>>
>>
>>
>> 1.       Wait for a test end to be reported to the test listener.
>>
>> 2.       Wait for a period of jmeter.exit.check.pause + 5000ms (The
>> pause hard coded in Jmeter for listener cleanup) + 500ms (extra pause
>> to provide an error margin).
>>
>>
>>
>> Unfortunately I still seem to be continuing before the .jtl files have
>> finished being written intermittently.
>>
>>
>>
>> I could scan the JMeter log file and wait until it reports the end of
>> the test, but this is really not a very nice solution IMHO.  Is
>> anything triggered after JMeter has completed clean up and written the
>> .jtl logs that I can hook a listener into that I have missed?
>
> JMeter non-GUI will exit.
>

Mime
View raw message