On 20/10/2008, Srinivasulu <[EMAIL PROTECTED]> 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: [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