appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.22k stars 756 forks source link

TestNG Dataprovider (parallel=true) on real iPad (one real device only) #1206

Closed pmswatuser closed 5 years ago

pmswatuser commented 5 years ago

The problem

Unable to reap the benefits of parallel execution when data driving a test method with a dataprovider. Parallel=true setting, when using Chrome on Windows, fires up parallel Chrome driver sessions (without using grid) on the same OS and executes the test while being thread safe. Can this be achieved on a real iOS device with Safari browser?

Toggling parallel=false, works just fine and gets the web views and completes mobile-web test, but happens sequentially. I understand, parallel execution can be achieved with multiple iPads hooked up to a Mac (with discrete wdalocalport and webkitproxyport), but how do we tackle parallel safari threads on a single device?

Environment

Appium CLI (Appium desktop doesn't work with webviews on real devices as of v1.13.0) iOS 12.2

Code

Sample provider for testNG method like so.

@DataProvider(parallel=true) public static Object [][] searchKeys(){ return new Object [][] { {"Apple"}, {"Microsoft"}, {"CNN"} };
}

mykola-mokhnach commented 5 years ago

moved to java client

mykola-mokhnach commented 5 years ago

Unfortunately there is no way to run parallel tests on a single mobile device, neither Android nor iOS