Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter remote Execution -- Is there any way to provide global property from ant?

In my Jmeter script I'm using property function i.e. ${__P(varName,2)} to specify variable value at run time.

When Executing script from CMD -- I can specify property value using -JvarName (i.e. -JvarName=5) and for remote Execution I can specify value using -GvarName (i.e. -GvarName=5) from CMD.

Now I'm trying to run this Jmeter script using ant build
and It's working fine on single PC. (i.e. runremote="false") But when I try to execute remotely on multiple PC (i.e. runremote="true") It Doesn't take values provided in property tag (i.e.<property name="varName" value="5"/>) is there any way to provide global property from ant.?? just like we do from CMD using argument -G .

<target name="JMeter" depends="start"> 
  <taskdef name="jmeter"    
        classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask">    
  </taskdef> 
  <jmeter jmeterhome="${jmeter_Home}"   
         resultlog="${report.output.location}/Report/${property.file}/${START_TIME}/JMete‌​rSummeryResults.jtl" 
         runremote="true"> 
      <testplans dir="../JMeter" includes="*.jmx" /> 
      <property name="USERS" value="${thread.users}" /> 
      <property name="SITE_ID" value="${site.id}" /> 
      <property name="FOLDER_ID" value="${folder.id}" /> 
      <property name="FILE_PATH" value="${file.upload.path}" /> 
  </jmeter> 

like image 801
Devang Avatar asked Oct 19 '22 12:10

Devang


1 Answers

There is a remote attribute which needs to be set to true.

<property name="varName" value="5" remote="true"/>

like image 146
vins Avatar answered Oct 27 '22 18:10

vins