0% found this document useful (0 votes)
20 views

How To Run The Script Using The TestNG Framework

Framework design

Uploaded by

karunjsiruthai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

How To Run The Script Using The TestNG Framework

Framework design

Uploaded by

karunjsiruthai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Steps to Download and Use TestNg framework

Steps to download the TestNg framework in Selenium :-

● Help —--> Eclipse Marketplace


● Search Test NG
● Install
● Accept the Form Click install
● Gave the Trust for the Software
● After Install the Eclipse will Restart

Help —--> Eclipse Marketplace


Search Test NG , Install and Allow the All permissions

NOTE:- I have Installed Already , So Kindly Follow the Above Steps . Once installation
Completed the Eclipse will Restart

Once Restart We are going to Add the Test NG library to our Script

● Right Click on the Script


● Select Properties
● Select java Build Path —--> Libraries
● Select The Class path and Select Add Library Button
● There You can find TestNG Select TestNG And Click on Next

Now the TESTNG library got added in the Script


We can Create the XML File for that Respective Code Using TEstNG

Steps to Create XML Using TESTNG

● Right Click on the Class file


● TESTNG
● Convert to TESTNG
● Finish

Sample XML File That I have Generated

<?xml version="1.0" encoding="UTF-8"?>


<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Suite">
<test thread-count="5" name="Test">
<classes>
<class name="demo.Day2"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->

TEST —----> Test Is a Folder Name

NOTE :- Collection of Test Folders is called a Suite . Inside the Suite we can set the
Multiple Folders

We can change the Test Folder name

Inside test Folder we can write the Multiple Class

Inside Classes We can enter the multiple Class

NOTE:- Suite Name Also We can add whatever we want

MOST IMPT :- We can run All the Test Cases in one shot Using XML File

You might also like