Unit testing on specific iOS versions?

plugins
ios
testing

#1

We’re developing a nativescript plugin for our project, and we need to run unit tests on iOS 9, 10 and 11 to test for compatibility issues.

How do we control which simulator “tns test ios” runs the tests on?


#2

You can try this:
When simulator is enabled, yo will see Hardware option at top bar.
Here you can switch into another device, close previous one and run ios again.
App will open on current open simulator.


#3

Thank you for the suggestion.

Unfortunately it isn’t what we’re after.
We need to run the tests on each of the platforms automatically, without manual steps like that.


#4

Use tns device ios --available-devices to get list of available devices, pick the device identifier you want to test with and then do tns run ios --device [device-identifier-copied]


#5

@manojdcoder
Thank you very much, it is exactly what we needed.