TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Ant

Last modified: 20 April 2023

This is a runner for Ant build.xml files. TeamCity comes bundled with Ant 1.8.2, and since TeamCity 8.1- with Ant 1.8.4.

Support for Running Parallel Tests



By using the <parallel> tag in your Ant script, it is possible to have the JUnit and TestNG tasks run in parallel. TeamCity supports this and should concurrently log the parallel processes correctly.

Ant Runner Settings



Ant Parameters



ant-net-tasks Tool



The Ant build runner comes with a bundled tool, ant-net-tasks, which includes the jar files required for network tasks, such as FTP, sshexec, scp and mail. It also contains missing link Ant task which can be used for REST requests.

To use the tool, specify -lib "%\teamcity.tool.ant-net-tasks%" in antAddAntCommandLineOptionDescription of the runner settings.

Java Parameters



Test parameters



Tests reordering works the following way: TeamCity provides tests that should be run first (test classes), after that, when a JUnit task starts, it checks whether it includes these tests. If at least one test is included, TeamCity generates a new fileset containing included tests only and processes it before all other filesets. It also patches other filesets to exclude tests added to the automatically generated fileset. After that JUnit starts and runs as usual.

Code Coverage



To learn about configuring code coverage options, refer to the Configuring Java Code Coverage page.