The test suite is used to execute more than one test class using a single XML file.
Test Suite always will be defined by an XML file that contains multiple test classes using XML tag.
Syntax of testsuite.xml
@BeforeSuite and @AfterSuite Annotation can be defined in the source code of class which will be executed before suite execution and after suite execution for a particular class.
Test Suite always will be defined by an XML file that contains 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"> <classes> <class name = "Test1" /> </classes> </test> <test name = "exampletest2"> <classes> <class name = "Test2" /> </classes> </test>
@BeforeSuite and @AfterSuite Annotation can be defined in the source code of class which will be executed before suite execution and after suite execution for a particular class.
Post a Comment
If you have any doubt in programming or join online classes then you can contact us by comment .