I am testing a web-ui using Selenium and TestNG. I have a test suite with many test classes in it.
I have a @BeforeSuite
method which also has a @Parameters
annotation, this method receives as a parameter the browser in which the Selenium test will be run, executing the lines:
selenium = new DefaultSelenium("localhost", 4444, browser, "http://localhost:8099");
selenium.start();
The XML I'm using to run the test suite is:
<suite name="suite">
<parameter name = "browser" value = "*firefox"/>
<test name="allTests">
<classes>
<class name="test.webui.MemcachedDeploymentTest" />
</classes>
</test>
</suite>
This works fine and the test runs in Firefox.
my problem is that i would like to somehow run this suite again, immediately after the first run finishes, but this time with Chrome as the browser. i now have 2 XML suites, one with Chrome and one with Firefox. Is there any way to run these test suites one after the other automatically? maybe using a third XML?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…