You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Eddie O'Sullivan <eo...@qad.com> on 2009/09/25 13:37:38 UTC

BeanShell Assertion - Can a failed assertion force the next iteration of a loop

Hi all,

If I have the following test:

      Loop Controller (x loops)
            HTTP1 Request
                  - Beanshell Assertion
            HTTP2 Request
                  - Beanshell Assertion
            HTTP3 Request
                  - Beanshell Assertion
            ......

If the beanshell assertion fails at HTTP1 Request, is it possible move on
to the next iteration of the loop? I am aware of the
SampleResult.setStopThread(true) but I do not want the thread to stop just
the current iteration of the loop.

Thanks in advance,
Eddie
                                                                 
                                                                 
                                                                 
 Eddie O'Sullivan                                (Embedded image 
 Application Performance                          moved to file: 
 Group                                             pic29852.gif) 
                                                                 
                                                                 
 QAD Ireland Ltd.           eos@qad.com                          
 Hamilton House             Tel:  +353 61                        
 National Technological     213616                               
 Park                       http://www.qad.com/                  
  Limerick, Ireland                                              
                                                                 
                                                                 
                                                                 
 This e-mail may contain                                         
     QAD proprietary                                             
  information and should                                         
      be treated as                                              
      confidential.                                              
                                                                 


Re: BeanShell Assertion - Can a failed assertion force the next iteration of a loop

Posted by sebb <se...@gmail.com>.
On 17 August 2010 07:19, SanderW <sa...@performancearchitecten.nl> wrote:
>
> Hi Sebb,
>
> Thanks for your reaction.
>
> For which of the two issues do you want me to raise a Bugzilla report?
>
> issue1 = When 'Action to be taken after a Sampler' error is set to 'Stop
> thread' the sampler error not shown in Results tree & Summary Report

That appears to be a bug.

> issue2 = When a sampler error occurs it is not possible to start a new
> iteration (thread)

That's not a bug as far as I can tell from the description.

> Kind Regards,
>
> Sander
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/BeanShell-Assertion-Can-a-failed-assertion-force-the-next-iteration-of-a-loop-tp533789p2637755.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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


Re: BeanShell Assertion - Can a failed assertion force the next iteration of a loop

Posted by SanderW <sa...@performancearchitecten.nl>.
Hi Sebb,

Thanks for your reaction.

For which of the two issues do you want me to raise a Bugzilla report?

issue1 = When 'Action to be taken after a Sampler' error is set to 'Stop
thread' the sampler error not shown in Results tree & Summary Report

issue2 = When a sampler error occurs it is not possible to start a new
iteration (thread)

Kind Regards,

Sander

-- 
View this message in context: http://jmeter.512774.n5.nabble.com/BeanShell-Assertion-Can-a-failed-assertion-force-the-next-iteration-of-a-loop-tp533789p2637755.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: BeanShell Assertion - Can a failed assertion force the next iteration of a loop

Posted by sebb <se...@gmail.com>.
On 10 August 2010 13:56, SanderW <sa...@performancearchitecten.nl> wrote:
>
> Hi, sorry for replying to an old message but i'm facing the same issues as
> the topicstarter.
>
> Is there still no other way to stop processing after HTTP1 Request, than to
> enclose the subsequent samplers in an If Controller?
>
>
> My JMeter-script (version 2.3.4) consists of 15 Transaction Controllers
> (with Generate parent sample switch on), each with multiple HTTP Requests.
> If one of the HTTP Requests fails the iteration should abort and the
> Transaction Controller should show a failed transaction in the summary
> report.
>
> The Thread Group looks like this:
> Number of Threads (users): 50
> Ramp-up Period = 300
> Loop Count = 10
> The 'Action to be taken after a Sampler' error is set to Continue. If I set
> this to Stop thread at this point and one of the HTTP Requests fails then
> the transaction will not show up in the summary report as failed nor is the
> transaction shown in the Results Tree, which makes it difficult to see which
> HTTP Request is failing.

That seems to be a bug - please raise a Bugzilla issue so it does not
get forgotten.

> After the Transaction Controller I added an If Controller that checks if the
> last sample was ok. If the last sample is not OK a Test Action with Stop
> Thread is called upon, but this causes the user to abort the script and not
> execute the other look counts.
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/BeanShell-Assertion-Can-a-failed-assertion-force-the-next-iteration-of-a-loop-tp533789p2428605.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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


Re: BeanShell Assertion - Can a failed assertion force the next iteration of a loop

Posted by SanderW <sa...@performancearchitecten.nl>.
Hi, sorry for replying to an old message but i'm facing the same issues as
the topicstarter.

Is there still no other way to stop processing after HTTP1 Request, than to
enclose the subsequent samplers in an If Controller?


My JMeter-script (version 2.3.4) consists of 15 Transaction Controllers
(with Generate parent sample switch on), each with multiple HTTP Requests.
If one of the HTTP Requests fails the iteration should abort and the
Transaction Controller should show a failed transaction in the summary
report.

The Thread Group looks like this:
Number of Threads (users): 50
Ramp-up Period = 300
Loop Count = 10
The 'Action to be taken after a Sampler' error is set to Continue. If I set
this to Stop thread at this point and one of the HTTP Requests fails then
the transaction will not show up in the summary report as failed nor is the
transaction shown in the Results Tree, which makes it difficult to see which
HTTP Request is failing.

After the Transaction Controller I added an If Controller that checks if the
last sample was ok. If the last sample is not OK a Test Action with Stop
Thread is called upon, but this causes the user to abort the script and not
execute the other look counts.

-- 
View this message in context: http://jmeter.512774.n5.nabble.com/BeanShell-Assertion-Can-a-failed-assertion-force-the-next-iteration-of-a-loop-tp533789p2428605.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: BeanShell Assertion - Can a failed assertion force the next iteration of a loop

Posted by sebb <se...@gmail.com>.
On 25/09/2009, Eddie O'Sullivan <eo...@qad.com> wrote:
>
>  Hi all,
>
>  If I have the following test:
>
>       Loop Controller (x loops)
>             HTTP1 Request
>                   - Beanshell Assertion
>             HTTP2 Request
>                   - Beanshell Assertion
>             HTTP3 Request
>                   - Beanshell Assertion
>             ......
>
>  If the beanshell assertion fails at HTTP1 Request, is it possible move on
>  to the next iteration of the loop? I am aware of the
>  SampleResult.setStopThread(true) but I do not want the thread to stop just
>  the current iteration of the loop.

No, the only options are stop thread and stop test.

If you only want to stop processing after HTTP1, you could enclose the
subsequent samplers in an If Controller.

>  Thanks in advance,
>  Eddie
>
>
>
>   Eddie O'Sullivan                                (Embedded image
>   Application Performance                          moved to file:
>   Group                                             pic29852.gif)
>
>
>   QAD Ireland Ltd.           eos@qad.com
>   Hamilton House             Tel:  +353 61
>   National Technological     213616
>   Park                       http://www.qad.com/
>   Limerick, Ireland
>
>
>
>   This e-mail may contain
>      QAD proprietary
>   information and should
>       be treated as
>       confidential.
>
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

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