I am using UIAutomation provided by Apple -> Xcode -> instruments. I have my Javascripts and the whole automation using instruments command line infrastructure running up.
I got an additional task of running automation on previous versions of simulator (iOS 6.0 , 5.1, 5.0, 4.3.2) to provide better coverage.
But i do not know a way to specify which version of iOS simulator to choose from. by default it always chooses the lates iOS simulator.
I have tried the following things:
Just type this command in Terminal: open -a Simulator. app to launch the most recent simulator. Type this command in Terminal to run the Simulator rigth from the its folder.
Starting the emulator Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager. Here's the basic command-line syntax for starting a virtual device from a terminal prompt: emulator -avd avd_name [ {- option [ value ]} … ]
Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download.
Run your app on the emulator After you have created an Android Virtual Device (AVD), you can start the Android Emulator and run an app in your project: In the toolbar, select the AVD that you want to run your app on from the target device drop-down menu. Click Run.
Since Xcode 5.1 Instruments supports specifying the simulator hardware type and iOS version from the command line.
instruments -w help
The command above will give you a list about the available hardvare-iOS combinations. On my machine thats are:
iPhone - Simulator - iOS 6.1
iPhone - Simulator - iOS 7.1
iPhone Retina (3.5-inch) - Simulator - iOS 6.1
iPhone Retina (3.5-inch) - Simulator - iOS 7.1
iPhone Retina (4-inch) - Simulator - iOS 6.1
iPhone Retina (4-inch) - Simulator - iOS 7.1
iPhone Retina (4-inch 64-bit) - Simulator - iOS 6.1
iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1
iPad - Simulator - iOS 6.1
iPad - Simulator - iOS 7.1
iPad Retina - Simulator - iOS 6.1
iPad Retina - Simulator - iOS 7.1
iPad Retina (64-bit) - Simulator - iOS 6.1
iPad Retina (64-bit) - Simulator - iOS 7.1
You can specify the hardware and iOS version also with -w flag. Example:
instruments -w "iPad Retina - Simulator - iOS 7.1" -t ...
Note that -w flag must come at the start of the command line, before any other flags, otherwise you get strange errors.
I have found this information at: http://cocoamanifest.net/articles/2014/03/ui-screen-shooter-now-simpler-and-more-robust-since-xcode-5-1.html
Using Instruments 5.0 (relate to Xcode 5.0):
If you don't see a particular iOS version, then you need to add that simulator in Xcode:
PS: I created some awesome screenshots, but stackoverflow won't let me post them. boo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With