Re: JVM Argument at Runtime
Posted by Chris F. on
URL: http://ngrinder.373.s1.nabble.com/JVM-Argument-at-Runtime-tp733p743.html
I haven't used an ANT plug-in with Maven yet, I was using ANT to execute load tests with JMeter and had recently adopted Grinder when I found nGrinder. The 3rd party application I am using is called Dynatrace from Compuware, you might have heard of them. Their system comes with an Automation library that allows you to use ANT / Maven to setup test meta data information and then records the method calls, response time, etc. over time. Here is a sample of the ANT file I was using with JMeter to run my automated load tests.
<project name="ant-jmeter" default="StopRecording" basedir=".">
<target name="init">
<taskdef
name="jmeter"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"
/>
<echo message="Init Completed" />
</target>
<property name="dtBaseDir" value="lib/dynaTrace" />
<property name="dtAgentGroup" value="Load Testing" />
<property name="dtProfile" value="LoadTesting" />
<import file="lib/dynaTrace/dtTaskDefs.xml"/>
<echo message="Import dtTaskDefs.xml" />
<target name="EnableProfileAndActivateConfiguration" depends="init">
<DtEnableProfile profileName="LoadTesting" enable="true" />
<DtActivateConfiguration profileName="LoadTesting" configuration="Default" />
<echo message="Enable Profile" />
</target>
<target name="ClearSession" depends="init,EnableProfileAndActivateConfiguration">
<DtClearSession profileName="LoadTesting" />
<echo message="Clear Live Session" />
</target>
<target name="StartRecording" depends="init,ClearSession">
<DtStartRecording profileName="LoadTesting" sessionNameProperty="sessionName" sessionName="JMeter_LoadTesting" sessionDescription="Automated Load Testing" appendTimeStamp="true" />
<echo message="Start Recording SessionName: ${sessionName}" />
</target>
<target name="GenerateLoad" depends="StartRecording">
<jmeter
jmeterhome="c:\jmeter"
resultlog="${basedir}/LoadTests/JMeterResults.jtl">
<testplans dir="${basedir}/LoadTests" includes="*.jmx"/>
</jmeter>
</target>
<target name="StopRecording" depends="init,EnableProfileAndActivateConfiguration,ClearSession,StartRecording,GenerateLoad">
<DtStopRecording profileName="LoadTesting" sessionNameProperty="SessionName" />
<echo message="Stopped Recording SessionName: ${SessionName}" />
</target>
</project>
Any help would be appreciated :)
Thanks