ios-driver / ios-driver

Selenium server to test native, hybrid and web apps on IOS. Join us on IRC #ios-driver on freenode
http://ios-driver.github.com/ios-driver/
Apache License 2.0
385 stars 158 forks source link

How to run multiple IOS native tests in a suite (testNG) on simulator? #139

Open sobhajha opened 11 years ago

sobhajha commented 11 years ago

We've written multiple tests for an iPhone app. Now we want to run them as part of a suite. In order to achieve continuous integration we are running through selenium grid.

When we run a suite containing one test everything is fine. When the suite contains multiple tests, then only the first test gets executed. With the previous version of ios-driver (0.6.2) we had to restart the node In order to run tests again. With the newest ios-driver the app has to be replaced as well.

Here's what we do:

Used: ios-server 0.6.3-jar-with-dependencies.jar

Starting the node via java -jar ios-server-0.6.3-jar-with-dependencies.jar -aut test.app -hub http://:4444/grid/register -host -port 4444 -simulators

Initialising the driver via IOSCapabilities iosCapabilities = IOSCapabilities.ipad("KDDI"); WebDriver driver = new RemoteIOSDriver("http://:4444/wd/hub", iosCapabilities));

Closing the session (for every test) driver.quit(); driver.close();

The execution of the second test results in following error: 28:12:630 WARNING IOSServlet.getResponse 130ms.
GET /session/:sessionId/tree [Fatal Error] :2:42: Character reference "&#

Is this kind of scenario supported? What are we doing wrong?

sobhajha commented 11 years ago

Smoke Suite Sample smokesuite

darraghgrace commented 10 years ago

Can you try with the latest jar, communication with Grid is much improved. The latest jar can be found on top right of this page - http://ios-driver.github.io/ios-driver/