+

Search Tips   |   Advanced Search


Use NeoLoad with ANT

Integrating NeoLoad with your ANT script is easy to start the Controller automatically. It only consists of using the NeoLoad task provided in NeoLoad 5.5/lib/neoload-ant-X.Y.Z.jar.

To make the NeoLoad task available to ANT, a taskdef element must be inserted first to tell ANT where to find the task definition. For example:

<taskdef name="neoload" 
	classname="com.neotys.nl.ant.NeoLoad" 
	classpath="${NEOLOAD.install.dir}/lib/neoload-ant-X.Y.Z.jar" />
<neoload 
	projectFile="projects/jpetstore/jpetstore.nlp" 
	scenarioname="scenario1" 
	testdescription="Nightly Load-Test ${testID}" 
	showgui="false" 
	report="projects/jpetstore/reports/report.xml" 
	exit="true" 
/>

The taskdef definition must occur only once in each ANT build file. It can appear anywhere on the top level, below the project element. When the neoload-ant-X.Y.Z.jar archive is moved to another location, it is necessary to specify the location of the NeoLoad command line executable using the ControllerExecutable parameter.

The taskdef element includes the following parameters:

Parameter

Action

projectFile

Mandatory
Specifies the project file (*.nlp).

scenarioname

Mandatory
Names the scenario.

testdescription

Optional
Describes the test.

showgui

Optional
Shows the graphical interface during the test, when set to true, . The default value is false.

report

Optional
Generates reports at the end of the test report. NeoLoad outputs the report in the format specified by the extension (.html, .pdf, .xml)

comparisonReport

Optional
Generates comparison reports at the end of the test (list of report files separated with comas). NeoLoad configures the report format to match the extension of the specified file (.html, .pdf, .xml). The reference report is filled in through the baseTest attribute.

baseTest

Optional
Specifies the name of the reference test on generating the comparison report.

baseLabel

Optional
Specifies the label of the reference test on generating the comparison report. The default value is Base.

currentLabel

Optional
Specifies the current test on generating the comparison report. The default value is Last.

ControllerExecutable

Optional
Defines the path to the NeoLoad executable (NeoLoad 5.5/bin/NeoLoadCmd.exe). This parameter is optional with the neoload-ant-X.Y.Z.jar archive from the NeoLoad installation directory. The parameter is mandatory when the archive to another directory is moved.

monitoredHosts

Optional
Activates the machines to monitor during the test (names list of the machines to monitor separated with comas). With this option, only the listed machines are activated.


Home