Currently Browsing

Posts Tagged ‘ unit testing ’

Create an Ant build for TestNG tests

The goal of this exercise is to run TestNG tests through Apache Ant.

First you have to have a sample TestNg project at your hand.
If you don’t have any, you can create the sample using the instructions below, or you can download it from using the link from the bottom of the post.
Create a simple class Exampletest.java

package main;

import org.testng.annotations.Test;

public class ExampleTest {

	@Test
	public void testA() throws Exception {

		System.out.println("Test finished.");

	}
}