Creating First TestNG Script in Eclipse

In the previous tutorial we learned different types of TestNG annotations available. Now we are going to see how to implement the TestNG in use.

How to create First TestNG Script in Eclipse?
Prerequistie :

1.Need to install Java in system.
2.Install Eclipse and TestNG.

Lets get started with how to create an TestNG Script in Eclipse.

1.Create a package(SampleTestNG) in your project under SRC folder.
2.Under the newly created package, create a new class (SampleTest).
3.Write @Test After the class name.
4.Create a method in java

5.To Execute the Test script in TestNG. Right click on the script(i.e SampleTestNG.java) and click RunAsàTestNG Test.

Leave a Comment

Your email address will not be published.