Create one xml file with name as CrossBrowserTesting.xml then paste the code.After save the file run the CrossBrowserTesting.xml file one by one test script run in all browsers.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="TestSuite" thread-count="3" parallel="none">
<test name="ChromeTest">
<parameter name="browser" value="Chrome" />
<classes>
<class name="com.practiceCode.CrossBrowserScript" />
</classes>
</test>
<test name="FirefoxTest">
<parameter name="browser" value="Firefox" />
<classes>
<class name="com.practiceCode.CrossBrowserScript" />
</classes>
</test>
<test name="IE">
<parameter name="browser" value="IE" />
<classes>
<class name="com.practiceCode.CrossBrowserScript" />
</classes>
</test>
</suite>
No comments:
Post a Comment