testng xml

In TestNG, we cannot define a suite in testing source code, but it is represented by one XML file, as suite is the feature of execution.

testng.xml is an XML file that describes configuration of TestNG test suite. Using Testng.xml file we can run test available in one or more class file and make them as a single group, hence making test more meaningful, we call them as scenario based testing.

  • A suite is represented by one XML file. It can contain one or more tests and is defined by the tag.
  • A test is represented by and can contain one or more TestNG classes.
  • A TestNG class is a Java class that contains at least one TestNG annotation. It is represented by the tag and can contain one or more test methods.
  • A test method is a Java method annotated by @Test in your source.

Can we run test without using testng.xml file?
Well answer is yes, you can run. But once your test become larger and requires configuration of multiple test at one place, the best option is testng.xml.

Read & Write Barcode using Selenium Webdriver

About Author

Myself KarthiQ, I am the author of this blog, I know ways to write a good article but some how I donot have the skills to make it to reach people, would you like help me to reach more people By sharing this Article in the social media.

Share this Article Facebook
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions

Recent Addition

new tutorial Registrations for Selenium Online Training is Over.

Below are the training details:
Meeting link : https://zoom.us/j/737840591
Starting Time : 9:00PM 18th DEC 2018
Join My Facebook Group
Join Group