Skip to main content

How to Setup the TestNG first Project in eclipse

In this article we will explain you about how to write the Test Cases  by using TestNG frame. here we will learn how to setup the TestNG framework in the Eclipse.
Step 1: First you need to create a Java project
Open the eclipse > Click on File  > Click on New > Click on Project
Selenium Web Driver, Automation Testing, Open Browser Script

Then select Java Project and then click on next Button
Selenium Web Driver, Automation Testing, Open Browser Script
Then right the project name and click on Next button then click on Finish Button
Selenium Web Driver, Automation Testing, Open Browser Script
Step 2: Now You need to create the package
for create the Package, First click on the newly created Project
Then Right Click on src folder > Click on New > Click on Package
Selenium Web Driver, Automation Testing, Open Browser Script, Select Package

Then Type the package name and click on Finish Button
Selenium Web Driver, Automation Testing, Open Browser Script, Package Name
Step 3: Now We need to create Class
Right Click on newly created package > click on New -> click on Class
Selenium Web Driver, Automation Testing, Open Browser Script, Create Class

Step 4: Now right click over the project name and select "Build Path" and then click on"Configure Build path"
Automation Testing, Selenium Web driver, TestNG Setup Guide

Step 5: In new opening window select "Libraries"
Automation testing, selenium Web driver, Guide to setup TestNG


Step 6: Now click on "Add Library" and select the TestNG from the next window and click on Next Button


Automation testing, selenium Web driver, guide to setup TestNG
and then click on Finish Button. You will see the TestNG in Libraries
Automation Testing, Selenium Web driver, TestNG setup Guide

Now click on Ok button of that window.
Step 7: Now Right click on the newly created class and , Took the mouse over "TestNG" and click on "create TestNG class"
then following window will open
Automation Testing, Selenium Web driver, TestNG Setup
Put the valid class name and click on finish button
then following code is showing . Here you can write your code 




Comments

Popular posts from this blog

What is API?

In general way, API (Application Programming Interface) is the intermediate software which is useful for two applications to communicate. API is the tool which is used for interaction of two applications. If developer developing any software which have multiple blocks (Modules) than developer use APIs to put them together.

Structural Testing

Structural Testing is the type of testing in which user should have the knowledge of the code because in this testing user need to check the structure of the system. Structural Testing is White Box Testing.