@Test (priority = 2, invocationCount = 3)
public void second() {
System.out.println(“second test”);
}
How can I achieve my desired scenario?
Another requirement here is that on the first test, android phone should be the first device and ios phone should be the second device. On the second test, the ios phone should be the first device and the android should be second. So it means that I need to use a different xml file.
<test name="TwoDevices - ios first">
<parameter name="appName" value="App2"/>
<parameter name ="device" value="IOS/iphone6_plus"/>
<parameter name ="secondDevice" value="ANDROID/lg4_v5"/>
<classes>
<class name="com.TestFactory"/>
</classes>
My question is if in order to run the tests non stop one after another then I need to add 40 more times for example the lines to the xml file or i can use an annotation or loop or any other thing?