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 <[email protected]> wrote:

From: Tech Newbie <[email protected]>
Subject: Does getDefaultParameters() works for global properties?
To: [email protected]
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.





      


      

Reply via email to