Enter your email address:

Delivered by FeedBurner

feedburner count

How to Add Command Line Properties to JMeter

Labels: ,

Command line properties are very helpful when running JMeter in non-gui mode.

Passing a property value to the test plan:
-J[prop name]=[value]

Accessing the property value from the test plan:
${__P(prop name,default-value)}
The first value is the property name. The second value is the default value if the test was started without passing a value to the property.

For example, if we want to configure the host name and port number of the server that we want to test, we can write ${__P(server.host,localhost)} in the server name and ${__P(server.port,80)} in the port number of the test plan HTTP Request Defaults config element.
The command line will look like this:
./jmeter -t testplan.jmx -n -Jserver.host=differenthostname -Jserver.port=8080


Post a Comment