Before we write our first TestNG
test, we have to create a Java project in Eclipse
1) Go to File | New | Other
2) Select Java Project as shown below and click on Next button
Then enter a Project name for a Java project and click on Finish.
3)Now Go To Project|Properties. Select Java Build Path on the left-hand side on the Properties
window This will display the build path for the newly created project
4) Click on the Libraries tab and click on the
Add Library
5) Select
TestNG on the Add Library window and click on Next
6) Click on Finish on your next
window. This will add the TestNG library to your Eclipse project.
Creating your first TestNG class:
11) Go to File | New | Other. This will open a
new Add wizard window in Eclipse.
2)Select TestNG class from the Add wizard window and click on Next.
3) On the next window click on the Browse button and select Java project where you want to create a class.
4)Enter the package name
and the test class name and click on Finish.
5)This window also gives you an
option to select different annotations while creating a new TestNG class. If
selected, the plugin will generate dummy methods for these annotations while
generating the class. This will add a new TestNG class to your project.
0 comments:
Post a Comment