Parallel 2 device
@BeforeSuite(alwaysRun=true)
public void setService(){
startServer();
}
AfterTest
public static void afterTest() {
if (DriverManager.getDriver() != null) {
DriverManager.quit();
}
}
@AfterSuite
public void closeServer(){
stopServer();
}
Aleksei
December 12, 2024, 7:15am
2
Show more code.
Most possible reason you use some static variables…
BTW 2 phones = you need 2 appium servers running each on unique ports.
1 Like
I also tried to initialize 2 appiumlocalservice at the same time at beforeTest but 2 threads only get 1 port so it fails, and I haven’t been able to handle that case yet.
Aleksei
December 12, 2024, 11:16am
6
Start from removing word “static” from all variables and functions
1 Like