You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Fabio Strozzi <fa...@mapsengineering.com> on 2012/10/03 10:06:43 UTC

SOAP Request and user variable expansion

Hi,
    I'm new to Jmeter and I'm trying to stress test my webservices.
The content of the SOAP message varies from call to call, so I reference
some user variables within it.
If I paste the content of the SOAP message in the Soap/XML-RPC Data box of
the WebService(SOAP) Request sampler, then the variables get expanded as
expected.
On the other hand, if I configure JMeter to read the SOAP message from a
file, JMeter is not expanding the user variables and the SOAP message that
is sent contains the text ${variable}. I left the "Memory Cache" flag
unchecked (but then I also tried falgging it, in vain).

Is this the expected behaviour?

I'm using JMeter 2.7 r1342410.

Thanks in advance.

Fabio

-- 
Fabio Strozzi - Maps spa
tel: +39 0521 052341
skype: sfragis
gtalk: fabio.strozzi.maps@gmail.com

Re: SOAP Request and user variable expansion

Posted by sebb <se...@gmail.com>.
On 3 October 2012 09:06, Fabio Strozzi
<fa...@mapsengineering.com> wrote:
> Hi,
>     I'm new to Jmeter and I'm trying to stress test my webservices.
> The content of the SOAP message varies from call to call, so I reference
> some user variables within it.
> If I paste the content of the SOAP message in the Soap/XML-RPC Data box of
> the WebService(SOAP) Request sampler, then the variables get expanded as
> expected.
> On the other hand, if I configure JMeter to read the SOAP message from a
> file, JMeter is not expanding the user variables and the SOAP message that
> is sent contains the text ${variable}. I left the "Memory Cache" flag
> unchecked (but then I also tried falgging it, in vain).
>
> Is this the expected behaviour?

Yes.

JMeter does not process variables in files.

> I'm using JMeter 2.7 r1342410.
>
> Thanks in advance.
>
> Fabio
>
> --
> Fabio Strozzi - Maps spa
> tel: +39 0521 052341
> skype: sfragis
> gtalk: fabio.strozzi.maps@gmail.com

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


Re: SOAP Request and user variable expansion

Posted by Fabio Strozzi <fa...@mapsengineering.com>.
Hi Eugene,
    thanks for your suggestion.
I'll try to use the eval and FileToString functions.

Regards

Fabio

-- 
Fabio Strozzi - Maps spa
tel: +39 0521 052341
skype: sfragis
gtalk: fabio.strozzi.maps@gmail.com


On Wed, Oct 3, 2012 at 1:16 PM, Eugene Kazakov <yu...@gmail.com> wrote:

> Hi,
> You can try something like
> ${__eval(${__FileToString(D:\jakarta-jmeter\JMeter\soap.xml)})}
> and if file contain some variable and Jmeter has that value in the same
> variable, it evaluate that
> I attached example, and try to read
> http://jmeter.apache.org/usermanual/functions.html#__eval
>
>
>
> On 3 October 2012 12:06, Fabio Strozzi <fa...@mapsengineering.com>wrote:
>
>> Hi,
>>     I'm new to Jmeter and I'm trying to stress test my webservices.
>> The content of the SOAP message varies from call to call, so I reference
>> some user variables within it.
>> If I paste the content of the SOAP message in the Soap/XML-RPC Data box of
>> the WebService(SOAP) Request sampler, then the variables get expanded as
>> expected.
>> On the other hand, if I configure JMeter to read the SOAP message from a
>> file, JMeter is not expanding the user variables and the SOAP message that
>> is sent contains the text ${variable}. I left the "Memory Cache" flag
>> unchecked (but then I also tried falgging it, in vain).
>>
>> Is this the expected behaviour?
>>
>> I'm using JMeter 2.7 r1342410.
>>
>> Thanks in advance.
>>
>> Fabio
>>
>> --
>> Fabio Strozzi - Maps spa
>> tel: +39 0521 052341
>> skype: sfragis
>> gtalk: fabio.strozzi.maps@gmail.com
>>
>
>
>
> --
> Thank you,
> Eugene Kazakov
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

Re: SOAP Request and user variable expansion

Posted by Eugene Kazakov <yu...@gmail.com>.
Hi,
You can try something like
${__eval(${__FileToString(D:\jakarta-jmeter\JMeter\soap.xml)})}
and if file contain some variable and Jmeter has that value in the same
variable, it evaluate that
I attached example, and try to read
http://jmeter.apache.org/usermanual/functions.html#__eval


On 3 October 2012 12:06, Fabio Strozzi <fa...@mapsengineering.com>wrote:

> Hi,
>     I'm new to Jmeter and I'm trying to stress test my webservices.
> The content of the SOAP message varies from call to call, so I reference
> some user variables within it.
> If I paste the content of the SOAP message in the Soap/XML-RPC Data box of
> the WebService(SOAP) Request sampler, then the variables get expanded as
> expected.
> On the other hand, if I configure JMeter to read the SOAP message from a
> file, JMeter is not expanding the user variables and the SOAP message that
> is sent contains the text ${variable}. I left the "Memory Cache" flag
> unchecked (but then I also tried falgging it, in vain).
>
> Is this the expected behaviour?
>
> I'm using JMeter 2.7 r1342410.
>
> Thanks in advance.
>
> Fabio
>
> --
> Fabio Strozzi - Maps spa
> tel: +39 0521 052341
> skype: sfragis
> gtalk: fabio.strozzi.maps@gmail.com
>



-- 
Thank you,
Eugene Kazakov