You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Steven Swor <sw...@gmail.com> on 2014/01/29 02:43:20 UTC

urlencode with variables loaded from csv

Hi folks,

Can someone please explain to me how JMeter handles variables loaded from
CSV, as opposed to handling user-defined variables? I was under the
impression that ${__urlencode(${csv_variable})} would produce the same
output as ${__urlencode(${user_defined_variable})}, but it appears this is
not the case.

A minimal test case is available at
https://issues.apache.org/bugzilla/attachment.cgi?id=31268. In that test
plan, the CSV data are declared before any of the thread groups, and
urlencode is called within each thread group.

In such a case, wouldn't the CSV variables (defined before the thread
groups in the test plan) be loaded before the user-defined variables
(defined within the thread groups)?

Thanks,
Steve

Re: urlencode with variables loaded from csv

Posted by sebb <se...@gmail.com>.
On 29 January 2014 01:43, Steven Swor <sw...@gmail.com> wrote:
> Hi folks,
>
> Can someone please explain to me how JMeter handles variables loaded from
> CSV, as opposed to handling user-defined variables? I was under the
> impression that ${__urlencode(${csv_variable})} would produce the same
> output as ${__urlencode(${user_defined_variable})}, but it appears this is
> not the case.

They *are* handled the same way.

But if the encoding function is called before the CSV variable has
been defined, of course it won't work.


> A minimal test case is available at
> https://issues.apache.org/bugzilla/attachment.cgi?id=31268. In that test
> plan, the CSV data are declared before any of the thread groups, and
> urlencode is called within each thread group.
>
> In such a case, wouldn't the CSV variables (defined before the thread
> groups in the test plan) be loaded before the user-defined variables
> (defined within the thread groups)?

Please read:

http://jmeter.apache.org/usermanual/component_reference.html#User_Defined_Variables

first para.

> Thanks,
> Steve

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