Devika
Devika

Reputation: 1

Jmeter: Issue with passing an value from Command line

When I pass an integer value from command line -Jvalue = 100, Jmx script reads teh value if I use it in user defined variable like ${__P(value)} or ${__P(value,2)}

When I pass a string value -Jvalue=jmeter, JMX script does not take the value..

Can you pls help me on this?

Upvotes: 0

Views: 792

Answers (1)

Dmitri T
Dmitri T

Reputation: 168072

Remove spaces around =, it needs to be

value=100

or

value=jmeter

All the properties values passed via command line arguments or user.properties file are treated as strings.

Also if you set the same property twice, only last value will be considered.

See Apache JMeter Properties Customization Guide for more information on the ways of JMeter properties manipulation

Upvotes: 1

Related Questions