Simple Example to Execute TestNG tests
This section will begin with a simple example which will illustrate the basic concepts involved in testing with TestNG.
1. By convention we will create HelloWorld class and we will invoke the TestNG through command line. Create a test folder folder in C drive Ex: C:\TestNG-Examples.
public class HelloWorld{
@Test
public void HelloWorld()
System.out.println("Hello World");
}
}
public class HelloWorld{
@Test
public void HelloWorld()
System.out.println("Hello World");
}
}