ANT is software build automating tool for Java code. Uses XML file named ‘build.xml’ as the input for the build tasks. If one wants to run TestNG task using ANT, XML should contain information for testng calls and this can be built in two ways
1. By defining a external task of type TestNG and referring this task in another target ANT call further down in the code
2. By defining as Java command in ANT XML
The command line syntax to run TestNG task is java org.testng.TestNG testng1.xml [testng2.xml testng3.xml ...]. The second option takes this approach of calling testNG using command line syntax but using ANT. Lets have look at the first option here in this post