You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jose Pablo Sarco <jo...@gmail.com> on 2009/08/18 20:34:41 UTC

Multiple values for a single request

Hi all,

I use JMeter 2.3.2 on XP. I have a little doubt about how I can generate
this scenario with JMeter.

Scenario:

* I have a request with a dynamic response that I store it with a regular
expression extactor. The name and the amount of values are dynamic.
i.e. In the first request the response is:
value1
value2
value3
Then, In a later request the response is:
value1

* I store all the values (value1, value2, value3, ..., valueN) with a
regular expression extractor using the Match No= -1
* Then I need to used all the stored values in a new request
i.e.
/app/showvalues.do?values=value1,value2,value3



The problem:

I the final request I need to send all the values, but I don't know how I
can send all the variables with a valid value, because when in the first
request I have a simple value, the final request fails because I sent
/app/showvalues.do?values=value1,${value_2},${value_3} were in this case
${value_2} and ${value_3} are empty.

Please, let me know if the scenario is confusing

Any advice?

Re: Multiple values for a single request

Posted by Deepak Shetty <sh...@gmail.com>.
hi
use a javascript function or beanshell post processor to check the existence
and format the values correctly..
http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_PreProcessor

regards
deepak


On Tue, Aug 18, 2009 at 11:34 AM, Jose Pablo Sarco <jo...@gmail.com>wrote:

> Hi all,
>
> I use JMeter 2.3.2 on XP. I have a little doubt about how I can generate
> this scenario with JMeter.
>
> Scenario:
>
> * I have a request with a dynamic response that I store it with a regular
> expression extactor. The name and the amount of values are dynamic.
> i.e. In the first request the response is:
> value1
> value2
> value3
> Then, In a later request the response is:
> value1
>
> * I store all the values (value1, value2, value3, ..., valueN) with a
> regular expression extractor using the Match No= -1
> * Then I need to used all the stored values in a new request
> i.e.
> /app/showvalues.do?values=value1,value2,value3
>
>
>
> The problem:
>
> I the final request I need to send all the values, but I don't know how I
> can send all the variables with a valid value, because when in the first
> request I have a simple value, the final request fails because I sent
> /app/showvalues.do?values=value1,${value_2},${value_3} were in this case
> ${value_2} and ${value_3} are empty.
>
> Please, let me know if the scenario is confusing
>
> Any advice?
>