Test suite is used to execute more then one test classes using single XML file.

Test Suite always will be defined by xml file which contain multiple test classes using xml tag.

Syntax of testsuite.xml

<?xml version = "1.0" encoding = "UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name = "Suite1">

   <test name = "exampletest1">
         <class name = "Test1" />
   <test name = "exampletest2">
         <class name = "Test2" />

@BeforeSuite and @AfterSuite Annotation can be define in scource code of class which will be executed before suite execution and after suiteexecution for particular class.

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post