Cannot pass user properties from jmeter maven plugin into JMeter test plan

666 views
Skip to first unread message

Richard Olsson

unread,
Aug 11, 2016, 6:57:12 AM8/11/16
to jmeter-plugins
Hi,

Haven't got any responses on this in other forums here. (Such as maven jmeter plugin)

So, would be nice to have feedbacks from others. Is it a bug, and is it known or not?
Or at least share this info to others.

Trying to pass parameters as user properties from maven into JMeter test plan. https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Modifying-Properties#5
But it seems that user.properties file isn't created/modified, i.e. not seen in target/jmeter/bin/ directory.

See,


BR
Richard

gli...@gmail.com

unread,
Aug 11, 2016, 9:19:51 AM8/11/16
to jmeter-plugins
The file should not be created, passing user properties like:

<configuration>
   <propertiesUser>
       <foo>bar</foo>
      </propertiesUser>
</configuration>

Is the equivalent of providing the property via -J argument when running JMeter in command-line non-GUI mode

jmeter -Jfoo=bar -n -t script.jmx -t results.jtl

Once you define property via <propertiesUser> section in pom.xml you will be able to access its value via __P() function where required like:

${__P(foo,)}

Demo:



Richard Olsson

unread,
Aug 11, 2016, 10:24:14 AM8/11/16
to jmeter-plugins
Hi,

Thanks for your reply.

But in this case I need it to work with Jenkins/Maven. So, I more or less knows that it's working from command line. But doesn't help me know.
So, there seems to be a jmeter maven plugin issue as described in detail here, https://groups.google.com/forum/#!topic/maven-jmeter-plugin-users/6tTSVV1bH_w.
just wanted to know if it's known issue, and if there is any workaround.

Now have I been forced to go back to 1.10.1.
The same test plan is then working fine with user variables passed from maven as user properties.


Thanks anyway.


BR
Richard
Reply all
Reply to author
Forward
0 new messages