jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arihan <>
Subject Re: How to run Multiple HTTP samplers inside the IF controller
Date Thu, 03 Oct 2013 10:31:01 GMT
I am using jmeter 2.9.

If i simply use if controller and put multiple http sampler inside it then
it works fine. 

However my scenario is bit different.

http sampler user logsin
simple controller - get excursion id
    http sampler - get all reservation ids (/reservations)
           reg expression extractor ( getReservationIdForExcursion, "id":
\"(.+?)\", $1$, -1)
    ForEach controller ( input - getReservationIdForExcursion, output -
          http sampler for each resevation-id (
             json path extractor:- reservationCode ,
             json path extractor:- serviceId ,
             json path extractor:- code ,
          if controller (${reservationCode} != null && ${serviceId} != null
&& ${code} != null)
              http sampler1
              http sampler2
              BSF post processor ( beanshell, This processor is to remove
all variables so that it would come              out of for loop)

Here the problem is only httpsampler1 runs. Anything I am missing??

If you refer the screenshot and result view.

As per result
The first login is for the http sampler login 
second and third http sampler login is because if controller condition is
Now it goes to HTTP sampler reservations
for each reservation id , it goes to the excursion view. 
The first Excursion view for Reservation id :- the if controller condition
did not get satisfied
The second excursion view for reservation id :- the if controller condition
got satisfied
so it came inside if controller  
Now here I expect it should run both the login http samplers. ( *however it
runs only once)*
Then it removes all variables through bsf post processor
Then it logs out.

Any idea how to resolve it????

Actually I need that if the condition true in if controller for a particular
reservation-id then all the http samplers mentioned inside if controller
should run . Then it would come out from the for loop.

View this message in context:
Sent from the JMeter - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message