You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Apache Wiki <wi...@apache.org> on 2010/02/24 21:58:45 UTC

[Jakarta-jmeter Wiki] Update of "JMeterAutomatedRemoteTesting" by JMeterAdmin

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" for change notification.

The "JMeterAutomatedRemoteTesting" page has been changed by JMeterAdmin.
The comment on this change is: Clarify properties/variables.
http://wiki.apache.org/jakarta-jmeter/JMeterAutomatedRemoteTesting?action=diff&rev1=4&rev2=5

--------------------------------------------------

   * have touched on remote testing (from GUI is fine)
  
  = Set up =
-  * In your existing test plan, make sure that any variations in testing make use of variables. For example, if running a HTTP sampler, use HTTP Request Defaults to specify a host as `${__P(targetHost)}`. Other useful places for variables might include number of threads, ramp-up period or scheduler duration in a thread group, using a format of `${__P(threadgroup.threads,500)}`  (The `__P` function is shorthand for `__parameter`. See the userguide for more info on using this parameter).
+  * In your existing test plan, make sure that any variations in testing make use of functions or variables. For example, if running a HTTP sampler, use HTTP Request Defaults to specify a host as `${__P(targetHost,localhost)}`. Other useful places for parameterisation might include number of threads, ramp-up period or scheduler duration in a thread group, using a format of `${__P(threadgroup.threads,500)}`  (The `__P` function is shorthand for `__property`. See the [http://jakarta.apache.org/jmeter/usermanual/functions.html#__P user manual] for more info on using this function).
   * Save your test plan and properties file to a directory.
   * Create a properties file containing all your variables. E.g. mytest.properties could contain threadgroup.threads=100, targetHost=my-target-host.com
   * The test plan does not need Listeners, as this will be configured via parameters. This will improve performance on the testing.
   * Run the test mode in stand-alone mode (i.e. no remote servers):   `jmeter -n -t load_test.jmx -l load_test_report.jtl -q mytest.properties -j mytest.log`
-  * 1 small piece of functionality missing is the ability to set global variables from a property file. the "-q" parameter defines an additional property file, which is the equivalent of setting properties for the contents of the file using the -J parameter. These parameters are not global however, as would be set by the -G parameter. The -G parameter can reference either a property in the format of `-Gprop=val` or a properties file, such as `-G./myglobal.properties`
+  * The "-q" parameter defines an additional property file, which is the equivalent of setting properties for the contents of the file using the -J parameter. These parameters are not sent to remote servers; for that one can use the -G parameter. The -G parameter can reference either a property in the format of `-Gprop=val` or a properties file, such as `-G./myglobal.properties`
- 
+  * Properties can be referenced anywhere in the test plan using the `__P()` function - e.g. `${__P(propname)}`
+  * There is no way currently to predefine variables, however the User Defined Variables table on the Test Plan can be used to create variables from properties. For example:
+ || Name: || Value: ||
+ || HOST  || `${__P(host,localhost)}` ||
   * On all client machines, start up JMeter server, ensuring that firewall is not blocking connections (clients must all be on the same subnet).
   * On JMeter controller (the host initializing the test), run the test with the -R parameter (can be run using -r and specfiying hosts in jmeter properties file):
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org