Unit testing on specific iOS versions?



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?


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.


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.


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]


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