You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Salman Ghaffar <Sa...@openwave.com> on 2009/03/30 17:53:33 UTC

Response assertion after if

I have following layout


--HTTP Request
|
--IF Controller
        |
         --Reponse Assertion.


This response assertion is not being checked in either case of the if
condition pass or fail, is that a bug in 2.3.1 ?

Thanks

salman



Re: Response assertion after if

Posted by Noel O'Brien <no...@newbay.com>.
A BSFAssertion / Beanshell Assertion would work i this case, seeing as both 
cases are 

Would something like this work:

1. define a retry variable
2. while controller with retry condition
3.	HTTP Sampler
4. 	Beanshell Assertion checks response, if retry link is present, re-iterate 
in while loop, otherwise make other assertions and exit

Regards,
Noel

On Monday 30 March 2009 17:46:02 Salman Ghaffar wrote:
> Basically in my response I get the splash screen which refreshes itself,
> so I can either get the content or a link to retry
>
>
>
> Through IF controller I check whether I've got the actual content or the
> retry link. ( a regex tries to extract retry link and I check regex's
> value in if controller)
>
>
>
> In case I get retry link, I try that link again through another request,
> In case I get original contents I want to check those contents for some
> strings in them.
>
>
>
> thanks
>
>
>
> Salman
>
>
>
> From: Noel O'Brien [mailto:nobrien@newbay.com]
> Sent: Monday, March 30, 2009 5:28 PM
> To: jmeter-user@jakarta.apache.org
> Cc: Salman Ghaffar
> Subject: Re: Response assertion after if
>
>
>
> What are you checking with the If Controller?
>
> Regards,
>
> Noel
>
> On Monday 30 March 2009 17:13:43 Salman Ghaffar wrote:
> > But than, if I want to check responses based on condition(if
>
> controller)
>
> > being true or false it won't be possible ?
> >
> >
> >
> > Because my assertion would always be child of If controller ?
> >
> >
> >
> >
> >
> > -----Original Message-----
> >
> > From: Noel O'Brien [mailto:nobrien@newbay.com]
> >
> > Sent: Monday, March 30, 2009 4:58 PM
> >
> > To: JMeter Users List
> >
> > Subject: Re: Response assertion after if
> >
> >
> >
> > It's an issue of scope; see
> >
> > http://jakarta.apache.org/jmeter/usermanual/build-
> >
> > test-plan.html section 3.6
> >
> >
> >
> > Response assertion will only be checked if it's a *direct* child of
>
> the
>
> > sampler, is a sibling test element or in a parent controller
> >
> >
> >
> > Regards,
> >
> > Noel
> >
> > On Monday 30 March 2009 16:53:33 Salman Ghaffar wrote:
> > > I have following layout
> > >
> > >
> > >
> > >
> > >
> > > --HTTP Request
> > >
> > >
> > >
> > > --IF Controller
> > >
> > >
> > >
> > > --Reponse Assertion.
> > >
> > >
> > >
> > >
> > >
> > > This response assertion is not being checked in either case of the
>
> if
>
> > > condition pass or fail, is that a bug in 2.3.1 ?
> > >
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> > > salman
> >
> > ---------------------------------------------------------------------
> >
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Response assertion after if

Posted by Salman Ghaffar <Sa...@openwave.com>.
Basically in my response I get the splash screen which refreshes itself,
so I can either get the content or a link to retry 

 

Through IF controller I check whether I've got the actual content or the
retry link. ( a regex tries to extract retry link and I check regex's
value in if controller)

 

In case I get retry link, I try that link again through another request,
In case I get original contents I want to check those contents for some
strings in them.

 

thanks

 

Salman 

 

From: Noel O'Brien [mailto:nobrien@newbay.com] 
Sent: Monday, March 30, 2009 5:28 PM
To: jmeter-user@jakarta.apache.org
Cc: Salman Ghaffar
Subject: Re: Response assertion after if

 

What are you checking with the If Controller? 

Regards,

Noel

On Monday 30 March 2009 17:13:43 Salman Ghaffar wrote:

> But than, if I want to check responses based on condition(if
controller)

> being true or false it won't be possible ?

> 

> Because my assertion would always be child of If controller ?

> 

> 

> -----Original Message-----

> From: Noel O'Brien [mailto:nobrien@newbay.com]

> Sent: Monday, March 30, 2009 4:58 PM

> To: JMeter Users List

> Subject: Re: Response assertion after if

> 

> It's an issue of scope; see

> http://jakarta.apache.org/jmeter/usermanual/build-

> test-plan.html section 3.6

> 

> Response assertion will only be checked if it's a *direct* child of
the

> sampler, is a sibling test element or in a parent controller

> 

> Regards,

> Noel

> 

> On Monday 30 March 2009 16:53:33 Salman Ghaffar wrote:

> > I have following layout

> >

> >

> > --HTTP Request

> >

> > --IF Controller

> >

> > --Reponse Assertion.

> >

> >

> > This response assertion is not being checked in either case of the
if

> > condition pass or fail, is that a bug in 2.3.1 ?

> >

> > Thanks

> >

> > salman

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org

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


Re: Response assertion after if

Posted by Noel O'Brien <no...@newbay.com>.
What are you checking with the If Controller? 


Regards,
Noel

On Monday 30 March 2009 17:13:43 Salman Ghaffar wrote:
> But than, if I want to check responses based on condition(if controller)
> being true or false it won't be possible ?
>
> Because my assertion would always be child of If controller ?
>
>
> -----Original Message-----
> From: Noel O'Brien [mailto:nobrien@newbay.com]
> Sent: Monday, March 30, 2009 4:58 PM
> To: JMeter Users List
> Subject: Re: Response assertion after if
>
> It's an issue of scope; see
> http://jakarta.apache.org/jmeter/usermanual/build-
> test-plan.html section 3.6
>
> Response assertion will only be checked if it's a *direct* child of the
> sampler, is a sibling test element or in a parent controller
>
> Regards,
> Noel
>
> On Monday 30 March 2009 16:53:33 Salman Ghaffar wrote:
> > I have following layout
> >
> >
> > --HTTP Request
> >
> > --IF Controller
> >
> >          --Reponse Assertion.
> >
> >
> > This response assertion is not being checked in either case of the if
> > condition pass or fail, is that a bug in 2.3.1 ?
> >
> > Thanks
> >
> > salman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Response assertion after if

Posted by Salman Ghaffar <Sa...@openwave.com>.
But than, if I want to check responses based on condition(if controller)
being true or false it won't be possible ?

Because my assertion would always be child of If controller ?


-----Original Message-----
From: Noel O'Brien [mailto:nobrien@newbay.com] 
Sent: Monday, March 30, 2009 4:58 PM
To: JMeter Users List
Subject: Re: Response assertion after if

It's an issue of scope; see
http://jakarta.apache.org/jmeter/usermanual/build-
test-plan.html section 3.6

Response assertion will only be checked if it's a *direct* child of the 
sampler, is a sibling test element or in a parent controller

Regards,
Noel

On Monday 30 March 2009 16:53:33 Salman Ghaffar wrote:
> I have following layout
>
>
> --HTTP Request
>
> --IF Controller
>
>          --Reponse Assertion.
>
>
> This response assertion is not being checked in either case of the if
> condition pass or fail, is that a bug in 2.3.1 ?
>
> Thanks
>
> salman


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


Re: Response assertion after if

Posted by sebb <se...@gmail.com>.
On 30/03/2009, Noel O'Brien <no...@newbay.com> wrote:
> It's an issue of scope; see http://jakarta.apache.org/jmeter/usermanual/build-
>  test-plan.html section 3.6
>
>  Response assertion will only be checked if it's a *direct* child of the
>  sampler, is a sibling test element or in a parent controller

Note that the If Controller won't even be executed unless it includes a sampler.

>  Regards,
>
> Noel
>
>
>  On Monday 30 March 2009 16:53:33 Salman Ghaffar wrote:
>  > I have following layout
>  >
>  >
>  > --HTTP Request
>  >
>  > --IF Controller
>  >
>  >          --Reponse Assertion.
>  >
>  >
>  > This response assertion is not being checked in either case of the if
>  > condition pass or fail, is that a bug in 2.3.1 ?
>  >
>  > Thanks
>  >
>  > salman
>
>

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


Re: Response assertion after if

Posted by Noel O'Brien <no...@newbay.com>.
It's an issue of scope; see http://jakarta.apache.org/jmeter/usermanual/build-
test-plan.html section 3.6

Response assertion will only be checked if it's a *direct* child of the 
sampler, is a sibling test element or in a parent controller

Regards,
Noel

On Monday 30 March 2009 16:53:33 Salman Ghaffar wrote:
> I have following layout
>
>
> --HTTP Request
>
> --IF Controller
>
>          --Reponse Assertion.
>
>
> This response assertion is not being checked in either case of the if
> condition pass or fail, is that a bug in 2.3.1 ?
>
> Thanks
>
> salman