can we use Taurus in ANT Build

109 views
Skip to first unread message

surendra matta

unread,
Mar 4, 2016, 11:43:26 AM3/4/16
to codename-taurus
Hi 

Is there any to launch the Taurus from ANT  build.xml

Basically i want to use ANT HTML in Jenkins.

Please let me know if we have any feasibility.

Regards,
Venkat

Andrey Pokhilko

unread,
Mar 4, 2016, 11:46:02 AM3/4/16
to codenam...@googlegroups.com
Hi,

Taurus is meant to be used in automation, so it will work for sure with ANT. Call it using Exec task: https://ant.apache.org/manual/Tasks/exec.html

Let us know if it works for you.

Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/a383eead-e520-4626-b1b6-0c290d8ae2fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

surendra matta

unread,
Mar 4, 2016, 1:07:13 PM3/4/16
to codename-taurus
Hi Andrey,

I am trying with build.xml 

 <project name="build-tests" default="Jmeter-load-tests" basedir="D:\apache-jmeter-2.13" >
 <property name="jmeter-home" value="D:\apache-jmeter-2.13" />
 <property name="executable-full-path" location="c:/python27/scripts"/>
  
  <path id="ant.jmeter.classpath">
  <fileset dir="." includes="ant-jmeter-1.1.1.jar"/>   
  </path>
 
 <target name="clean">
    <!-- <delete file="reports.html"/> -->
    <delete file="jmeter.log"/>
<delete file="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl"/>
<delete file="D:/apache-jmeter-2.13/AntReports/Report2.html"/>
<mkdir dir="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl"/>
    <mkdir dir="D:/apache-jmeter-2.13/AntReports/Report2.html"/>
 </target>
 
  <target name="Jmeter-load-tests" >
  <taskdef name="jmeter" classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" classpathref="ant.jmeter.classpath" />
 
    ;
    <exec executable="cmd">
    <!-- <arg value="/c"/>  -->
    <arg value="c:/python27/scripts/bzt MySherwin_5Pages.yml"/>
    <!-- <arg value="bzt MySherwin_5Pages.yml"/> -->
</exec>
<echo message="Running load tests in Jenkins By using Taurus" />
 
  <jmeter jmeterhome="${basedir}" resultlog="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl">
    <property name="jmeter.save.saveservice.assertion_results" value="all"/>
<property name="jmeter.save.saveservice.output_format" value="xml"/>
    </jmeter>
    <xslt in="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl"
     out="D:/apache-jmeter-2.13/AntReports/Report2.html"
 style="${basedir}/extras/jmeter-results-detail-report_21.xsl"/>
  </target>
  </project>

finally Build is success but unable to launch the Taurus , could you please help me on this

Regards,
venkat

Andrey Pokhilko

unread,
Mar 4, 2016, 1:13:40 PM3/4/16
to codenam...@googlegroups.com
Which error do you get when it fails to start Taurus?


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

surendra matta

unread,
Mar 4, 2016, 1:15:38 PM3/4/16
to Andrey Pokhilko, codenam...@googlegroups.com
I am getting any error .. Simply build is sucess thats why i am confussed
You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/6rz5UaGHdnU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/56D9D050.6060800%40blazemeter.com.

For more options, visit https://groups.google.com/d/optout.


--
Regards,
Surendra Matta,
#:-224-805-7731

Andrey Pokhilko

unread,
Mar 4, 2016, 1:18:04 PM3/4/16
to surendra matta, codenam...@googlegroups.com
Try changing <exec executable="cmd"> into <exec executable="bzt">

Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

surendra matta

unread,
Mar 4, 2016, 1:39:42 PM3/4/16
to codename-taurus, surend...@gmail.com
After modification the build exec = bzt  i getting  below error

BUILD FAILED
D:\apache-jmeter-2.13\extras\build.xml:21: Execute failed: java.io.IOException: Cannot run program "bzt" (in directory "D:\apache-jmeter-2.13"): CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
	at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
	at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
	at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
	at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
	at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
	at org.apache.tools.ant.Main.runBuild(Main.java:851)
	at org.apache.tools.ant.Main.startAnt(Main.java:235)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 24 more

Did we need to specify any path of bzt ?

Regards,
Venkat
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taurus+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/6rz5UaGHdnU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codename-taurus+unsubscribe@googlegroups.com.

Andrey Pokhilko

unread,
Mar 4, 2016, 1:40:41 PM3/4/16
to codenam...@googlegroups.com
Try to point it to full path to bzt, "c:\python27\scripts\bzt.exe"

Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

surendra matta

unread,
Mar 4, 2016, 2:00:41 PM3/4/16
to codename-taurus
I modified as per your recommendation but i am getting below error

Jmeter-load-tests:
     [exec] 13:58:32 INFO: Taurus CLI Tool v1.2.0
     [exec] 13:58:32 INFO: Starting with configs: ['c:/python27/scripts/MySherwin_5Pages_1.yml']
     [exec] 13:58:32 INFO: Configuring...
     [exec] 13:58:32 INFO: No personal config: C:\windows\system32\config\systemprofile\.bzt-rc
     [exec] 13:58:32 INFO: Artifacts dir: C:\Users\vsm754\Desktop\Jmeter-Taurus\Jenkins-5pages\MySherwin_5Pages_1603041358
     [exec] 13:58:33 INFO: Preparing...
     [exec] 13:58:33 INFO: Installing JMeter
     [exec] 13:58:33 INFO: Will try to install JMeter into C:\windows\system32\config\systemprofile\.bzt\jmeter-taurus
     [exec] 13:58:35 ERROR: Can't fetch http://jmeter.apache.org/download_jmeter.cgi
     [exec] 13:58:36 ERROR: Error while downloading http://apache.claz.org/jmeter/binaries/apache-jmeter-2.13.zip
     [exec] 13:58:36 ERROR: RuntimeError: ('%s download failed: No more mirrors to try', 'JMeter')
     [exec] 13:58:36 WARNING: Please wait for graceful shutdown...
     [exec] 13:58:36 INFO: Post-processing...
     [exec] 13:58:36 INFO: Artifacts dir: C:\Users\vsm754\Desktop\Jmeter-Taurus\Jenkins-5pages\MySherwin_5Pages_1603041358
     [exec] 13:58:36 WARNING: Done performing with code: 1
     [exec] Result: 1
     [echo] Running load tests in Jenkins By using Taurus

Build File :-

 <project name="build-tests" default="Jmeter-load-tests" basedir="D:\apache-jmeter-2.13" >
 <property name="jmeter-home" value="D:\apache-jmeter-2.13" />
 <property name="executable-full-path" location="c:/python27/scripts"/>
  
  <path id="ant.jmeter.classpath">
  <fileset dir="." includes="ant-jmeter-1.1.1.jar"/>	   
  </path>
 
 <target name="clean">
    <!-- <delete file="reports.html"/> -->
    <delete file="jmeter.log"/>
	<delete file="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl"/>
	<delete file="D:/apache-jmeter-2.13/AntReports/Report2.html"/>
	<mkdir dir="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl"/>
    <mkdir dir="D:/apache-jmeter-2.13/AntReports/Report2.html"/>
 </target>
 
  <target name="Jmeter-load-tests" >
  <taskdef name="jmeter" classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" classpathref="ant.jmeter.classpath" />
 
    <exec executable="c:/python27/scripts/bzt.exe">
    <!-- <arg value="/c"/>  -->
    <arg value="c:/python27/scripts/MySherwin_5Pages_1.yml"/>
    <!-- <arg value="bzt MySherwin_5Pages.yml"/> -->
	</exec>
	<echo message="Running load tests in Jenkins By using Taurus" />	
	 
  <jmeter jmeterhome="${basedir}" resultlog="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl">
    <property name="jmeter.save.saveservice.assertion_results" value="all"/>
	<property name="jmeter.save.saveservice.output_format" value="xml"/>
    </jmeter>
	
    <xslt in="C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/Ant Results/report.jtl"
	      out="D:/apache-jmeter-2.13/AntReports/Report2.html"
		  style="${basedir}/extras/jmeter-results-detail-report_21.xsl"/>
  </target>
  </project>

YML File :-

settings:
  artifacts-dir: C:/Users/vsm754/Desktop/Jmeter-Taurus/Jenkins-5pages/MySherwin_5Pages_%y%m%d%H%M # path where to save artifacts, default is %Y-%m-%d_%H-%M-%S.%f
  aggregator: consolidator
  default-executor: jmeter
  check-interval: 1
  proxy:  # custom proxy settings
     address: http://proxy.proxysherwin.com:80
     username: vsm754
     password: sherwin5

modules:
  jmeter:
    path: ~/.bzt/jmeter-taurus/bin/jmeter
    download-link: http://apache.claz.org/jmeter/binaries/apache-jmeter-{version}.zip
    version: 2.13

execution: 
 concurrency: 10
 ramp-up: 120s
 step: 12
 hold-for: 5m
 think-time: 1s
 ramp-down: 20
 #iterations: 200
 distributed: 
  - 10.240.240.57
  - 10.20.101.230
  - 10.20.100.25
  - 10.240.243.9
  - 10.20.100.80
  - 10.240.243.220

 scenario:
   #script: D:\apache-jmeter-2.13\bin\My_Sherwin_tauras_1.jmx
   script: D:\apache-jmeter-2.13\bin\MYSherwin_5Pages_Taurus.jmx
   data-sources:
     - path: MySherwin_Users.csv
       quoted: true

modules:
  jmeter:
    system-properties:
      http.proxyHost: proxy.proxysherwin.com
      http.proxyPort: 80
      username: vsm754
      password: sherwin5

modules:
 blazemeter:
   test: MySherwin_5Pages
   report-name: Mysherwin_5pages_60Users
   project: Mysherwin
   token: Ph53DEuLd1GSawR1PucE
 
reporting:
  - module: blazemeter
    summary: true  
    percentiles: true  
    failed-labels: false
    test-duration: true

Please verify once

FYI.. But the yml is working through taurus

Andrey Pokhilko

unread,
Mar 4, 2016, 2:02:46 PM3/4/16
to codenam...@googlegroups.com
It's good, we're having a progress. Now Taurus starts but is unable to download and install JMeter.

To fix it, you could specify in your test config the path to pre-installed JMeter, or fix the problem why Taurus can't access Internet to download stuff (maybe because of firewall).


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
-- You received this message because you are subscribed to the Google Groups "codename-taurus" group. To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/5122929f-db0f-41a0-80ec-d1ecf3bf52c7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

surendra matta

unread,
Mar 4, 2016, 2:12:00 PM3/4/16
to codename-taurus
still i have the same problem 

after modifying the module to 

modules:
  jmeter:
    path: D:\apache-jmeter-2.13\bin\jmeter.bat
    # version: 2.13

i am attaching the bzt.log , please check once
bzt.rar

Andrey Pokhilko

unread,
Mar 4, 2016, 2:26:12 PM3/4/16
to codenam...@googlegroups.com
Hi,

From your log I see that path is still unchanged. This means that the option to change "path" was not applied.

Where did you modify the jmeter path? It should be in your config MySherwin_5Pages_1.yml. Don't try to modify system Taurus files in "etc" - you'll break the tool.

If possible, please share your file "MySherwin_5Pages_1.yml"


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
-- You received this message because you are subscribed to the Google Groups "codename-taurus" group. To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/6d0e1925-4b94-4fb1-ba39-499d88c065e3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

surendra matta

unread,
Mar 4, 2016, 2:34:56 PM3/4/16
to codename-taurus
I am able to launch the ant through command prompt and its working without any issues but when i am trying to launch the ANT  through Jenkns  is not working and i am getting the above error

please find the attached yml file 
...
MySherwin_5Pages_1.yml

surendra matta

unread,
Mar 4, 2016, 2:39:44 PM3/4/16
to codename-taurus
Hey can you remove yml from this forum , i forget to hide my credentials in the YML file
...

surendra matta

unread,
Mar 4, 2016, 2:51:17 PM3/4/16
to codename-taurus
One more step we succedd , after adding the "EnvInject Plugin" in enkins and after adding the below parameter 

http_proxy=http://proxy.proxy***.com:80
https_proxy=http://proxy.proxy**.com:80

able to download the jmeter but i am getting error as "Error: Unable to access jarfile C:\Windows\System32\config\systemprofile\.bzt\jmeter-taurus\bin\ApacheJMeter.jar"

when i navigate to system profile , i didn't see any .bzt folder  in the desitination

Please find the jenkins console output

Started by user anonymous
[EnvInject] - Loading node environment variables.
Building in workspace C:\Program Files (x86)\Jenkins\workspace\ANT_Taurus
[EnvInject] - Executing scripts and injecting environment variables after the SCM step.
[EnvInject] - Injecting as environment variables the properties content 
http_proxy=http://proxy.proxysherwin.com:80
https_proxy=http://proxy.proxysherwin.com:80

[EnvInject] - Variables injected successfully.
[extras] $ cmd.exe /C '""C:\Program Files\apache-ant-1.9.4\bin\ant.bat" -file build.xml && exit %%ERRORLEVEL%%"'
Buildfile: D:\apache-jmeter-2.13\extras\build.xml

Jmeter-load-tests:
     [exec] 14:47:56 INFO: Taurus CLI Tool v1.2.0
     [exec] 14:47:56 INFO: Starting with configs: ['c:/python27/scripts/MySherwin_5Pages_1.yml']
     [exec] 14:47:56 INFO: Configuring...
     [exec] 14:47:56 INFO: No personal config: C:\windows\system32\config\systemprofile\.bzt-rc
     [exec] 14:47:56 INFO: Artifacts dir: C:\Users\vsm754\Desktop\Jmeter-Taurus\Jenkins-5pages\MySherwin_5Pages_1603041447
     [exec] 14:47:57 INFO: Preparing...
     [exec] 14:47:57 WARNING: Converting kg.apc.jmeter.threads.SteppingThreadGroup (${__machineName()}_MySherwin) to normal ThreadGroup
     [exec] 14:47:59 INFO: Starting...
     [exec] 14:47:59 INFO: Initiating data feeding...
     [exec] 14:48:00 INFO: Started data feeding: https://a.blazemeter.com/app/#reports/r-ext-56d9e66ee0956
     [exec] 14:48:00 INFO: Waiting for finish...
     [exec] Error: Unable to access jarfile C:\Windows\System32\config\systemprofile\.bzt\jmeter-taurus\bin\ApacheJMeter.jar
     [exec] 14:48:00 INFO: Waiting to get first results...
Build was aborted

Please help me on this

Regards,
venkat
...

surendra matta

unread,
Mar 4, 2016, 4:43:58 PM3/4/16
to codename-taurus
I just copied the .bzt folder to systemprofile  folder then it starts working

Finally i am able to run the Taurus from the ANT build.xml by using Jenkins and also i am able to see the blazemeter reports at runtime

Thanks for support..

Regards,
Venkat
...

ragesh ns

unread,
Mar 20, 2016, 2:33:35 AM3/20/16
to codename-taurus
hi
 kindly sent to me your build.xml for ruuninf taurus script?

my email id rage...@gmail.com
...
Reply all
Reply to author
Forward
0 new messages