You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Tech Newbie <te...@yahoo.com> on 2009/11/12 20:07:37 UTC
Does getDefaultParameters() works for global properties?
My test plan has a java request that include a parameter:
<elementProp name="My Arg" elementType="Argument">
<stringProp name="Argument.name">My Arg</stringProp>
<stringProp name="Argument.value">${__P(myArg,1)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
When running in non-gui mode, I specify "-JmyArg=42" and getDefaultParameters() will return 42 as expected.
However, this doesn't work remotely, even after I changed "-JmyArg=42" to "-GmyArg=42".
>From jmeter client log:
jmeter.engine.ClientJMeterEngine: Sending properties {myArg=42}
>From remote jmeter log:
jmeter.engine.StandardJMeterEngine: Applying properties {myArg=42}
So it looks like the property gets pass over but getDefaultParameters() returns the default value of 1 instead of 42.
Another data point is that properties such as threads count
<stringProp name="ThreadGroup.num_threads">${__P(submitThreads,1)}</stringProp>
works correctly with -G, but not the properties return via getDefaultParameters().
What am I doing wrong? Does getDefaultParameters() works for global properties?
Thanks.
Re: Does getDefaultParameters() works for global properties?
Posted by Tech Newbie <te...@yahoo.com>.
Oh never mind. I accidently commented out call to context.getParameter() to retrieve the value. Duh! Now the -G properties are working as -J.
Sorry for the false alarm.
--- On Thu, 11/12/09, Tech Newbie <te...@yahoo.com> wrote:
From: Tech Newbie <te...@yahoo.com>
Subject: Does getDefaultParameters() works for global properties?
To: jmeter-user@jakarta.apache.org
Date: Thursday, November 12, 2009, 7:07 PM
My test plan has a java request that include a parameter:
<elementProp name="My Arg" elementType="Argument">
<stringProp name="Argument.name">My Arg</stringProp>
<stringProp name="Argument.value">${__P(myArg,1)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
When running in non-gui mode, I specify "-JmyArg=42" and getDefaultParameters() will return 42 as expected.
However, this doesn't work remotely, even after I changed "-JmyArg=42" to "-GmyArg=42".
>From jmeter client log:
jmeter.engine.ClientJMeterEngine: Sending properties {myArg=42}
>From remote jmeter log:
jmeter.engine.StandardJMeterEngine: Applying properties {myArg=42}
So it looks like the property gets pass over but getDefaultParameters() returns the default value of 1 instead of 42.
Another data point is that properties such as threads count
<stringProp name="ThreadGroup.num_threads">${__P(submitThreads,1)}</stringProp>
works correctly with -G, but not the properties return via getDefaultParameters().
What am I doing wrong? Does getDefaultParameters() works for global properties?
Thanks.