Monday, 14 January 2019

Parallel Testing

Enable Parallel Testing

Edit Scheme -> Test -> Info -> Options -> Select 'Execute in parallel on Simulator'


Then XCode would run tests on cloned simulators for different test cases.
You can also specify the devices you want by command line

xcodebuild 
-workspace ????.xcworkspace 
-scheme ???? -sdk iphonesimulator 
-destination 'platform=iOS Simulator,id=????’ 
-destination 'platform=iOS Simulator,name=iPhone 6,OS=8.1'
test &

Note:
1. By default, the above approach dose not  support test cases interdependent among simulators
2. It slows down performance testing. Keep performance tests in its own scheme and disable parallel.

Expecting same testing case running in different simulators and communicating with each other. This article is worth reading.
https://medium.com/@Maryamfekri/how-to-run-uitest-for-messaging-features-in-an-ios-application-777de0440b99

No comments:

Post a Comment