How To Create the TestNG.XML File in Selenium?

.

Importance of XML file in TestNG Configuration

How To Create the TestNG.XML File in Selenium?


How to create an Testng XML file in Eclipse?

Just Follow the Below Steps to Create an XML file in Eclipse

Step 1: Right-click on the project. you will see TestNG and then click on the Convert to TestNG option.

Testng XML File in Selenium

Step 2 The below screen shows the preview of the XML file. Click on the Next button.


Create XML File In Selenium 

Step 3 Click on the Finish button.

How To Create the TestNG.XML File in Selenium?


Step 4: XML File will look like as in Fig.





TestNG XML Hierarchy

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

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="Suite">

<test name="userSignup">


<classes>

<class name="testNGPackage.FirstTestngClass"/>

<class name="testNGPackage.SecondTestngClass"/>

</classes>


</test> <!-- Test -->

</suite> <!-- Suite -->




Hope!!! The above Tutorial on How to create an XML File in TestNG is helpful for you...

Team,
QA acharya

Tags: How to create TesNG XML File , XML File in TestNG , TestNG XML File in Selenium 

Post a Comment

0 Comments