I don't think there's an easy (*) way to do this at present, though it
would not be too hard to add a fail counter to each thread, and a
counter for the thread group as well.

The ThreadGroup test element could then be extended to include maximum
thread and/or test failure counts.

Is that the sort of thing you'ld like to see?

==

(*) I think it is possible to use the BeanShell Assertion to do what you want:

The assertion itself can either be checked by the script, or the
script can check the Failure variable to see if previous assertion(s)
have marked the sample as failed.

If it has failed, then increment a counter. If the counter exceeds a
value, then stop the thread or the test, using the Response object as
follows:

Response.setStopThread(true)
or
Response.setStopTest(true)

The counter can be kept in a property (which will be global to the
test), as can the threshold value.

jmeter.properties can be editted to set "beanshell.assertion.init" to
a file that contains startup code.

For example BeanShellSampler.bshrc could be amended and used - it
contains methods to get and set properties.

Be careful to choose a property name that is not used elsewhere.

S.
On Fri, 04 Mar 2005 08:43:30 -0800, Sergey Ten <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I wonder if there is a way to continue execution of a test plan in
> JMeter until certain number of failres occur?
> I am developing a test plan, which will run forever (or for a very long
> time) and send a number of HTTP requests.  I would like to parse
> Response Messages returned and if a specific text is found, treat it as
> the request failure, but I would like the test plan to keep running
> until  the number of failures exceeds some limit. I wonder whether and
> how it can be done? I looked at the ResponseAssertion and
> BeanShellAssertion. It seems none of them directly do what I need. Any
> help will be appreciated.
> 
> Thanks,
> Sergey
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to