In this tutorial, We will learn how to install and configure TestNG with Eclipse to use TestNG framework in automating scripts using Selenium WebDriver.
- Install TestNG in Eclipse IDE.
- Configure TestNg Library with the Selenium Project in Eclipse.
Install TestNG in Eclipse IDE
Note - Most of the times TestNG is pre-installed with the Eclipse IDE. So you don't need to do this step.
How to Verify?
Steps: Right click on the Project -> Click on the Build Path -> Click on Configure Build path -> Click on 'Add Library' -> Verify 'TestNG' option as shown in the image below.
If the 'TestNG' option is available as shown in the image above, it means TestNG is pre-installed in the Eclipse IDE.
If Not, then??
Follow below steps to Install TestNG in Eclipse IDE.
- Launch Eclipse.
- On the menu bar, click Help.
- Choose the "Eclipse Marketplace..." option.
4. In the Eclipse Marketplace dialog box, type TestNG in the search box and press the search button( magnifying glass) or press Enter key.
5. Click Install
6. A new window for feature selection will open, Do not change anything and Click on confirm button.
7. Click Next again on the succeeding dialog box until you reach the License Agreement dialog.
8. Click "I accept the terms of the license agreement" then click Finish.
9. If you encounter a Security warning, just click OK
10. When Eclipse prompts you for a restart, just click Yes.
11. After the restart, verify if TestNG was indeed successfully installed. Click Window > Preferences and see if TestNG is included on the Preferences list.
Thus, TestNG is installed in Eclipse IDE.
After Installation of TestNG in Eclipse IDE, We need to configure TestNG Library in our Project(Created In Eclipse) to use the annotations and various useful features provided by TestNG framework.
This is all about how to install and configure TestNg in Eclipse IDE.
In this next tutorial, we will see how to run a selenium test case using TestNG Framework.
selenium trainings
ReplyDeletesql server dba training
Testing tool training