You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Srinivasulu <sr...@cognizant.com> on 2008/10/20 08:42:43 UTC

How to capture middle value in Mercury Tours application?

Hi,

In Mercury Tours application, we are booking for the flights. we need to
capture the total count of flights and delete first flight for 1st
iteration, middle flight for 2nd iteration and last flight for 3rd
iteration. First flight can be deleted by including '0' for Match number
column. Can you pls let me know the procedure to capture middle flight.
-- 
View this message in context: http://www.nabble.com/How-to-capture-middle-value-in-Mercury-Tours-application--tp20064015p20064015.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: How to capture middle value in Mercury Tours application?

Posted by Srinivasulu <sr...@cognizant.com>.

Hi,

Thanks for the response. Please let me know how to list all the flight names
that are booked with the To port and From port names implementing "For Each
Controller"?
-- 
View this message in context: http://www.nabble.com/How-to-capture-middle-value-in-Mercury-Tours-application--tp20064015p20083688.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: How to capture middle value in Mercury Tours application?

Posted by sebb <se...@gmail.com>.
On 20/10/2008, Srinivasulu <sr...@cognizant.com> wrote:
>
>  Hi,
>
>  In Mercury Tours application, we are booking for the flights. we need to
>  capture the total count of flights and delete first flight for 1st
>  iteration, middle flight for 2nd iteration and last flight for 3rd
>  iteration. First flight can be deleted by including '0' for Match number
>  column. Can you pls let me know the procedure to capture middle flight.

If you are referring to using the Regular Expression Post-Processor:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor

then Match No. = 0 means to choose a random value.

You can use the BeanShell function to do arithmetic, e.g. if the no of
flights is NUMFLY then you could use
${__BeanShell((int)($NUMFLY+1)/2)} to calculate the middle number.

See:

http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell

It looks like Javascript does not support integer division directly,
and unfortunately Jexl has a bug - the "div" operator behaves exactly
as /, instead of returning an int.

> --
>  View this message in context: http://www.nabble.com/How-to-capture-middle-value-in-Mercury-Tours-application--tp20064015p20064015.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