Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UI Test, not able to run iOS ui tests - Unable to determine simulator version for X

When I want to run my UI tests for iOS I get the following message:

SetUp : System.Exception : Unable to determine simulator version for X

Stack trace:

  at Xamarin.UITest.iOS.Instruments.GetMajorVersionForSimulator (System.String deviceIdentifier) [0x0008c] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x0011a] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient, Xamarin.UITest.Shared.Http.HttpClient xtcServicesClient, System.Boolean testCloudUseDeviceAgent) [0x00068] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x002af] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <2a16c16730a54859bda72c6bc1c728f7>:0 
  at UniversalApp.UITests.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x0002d] in /Users/testing/backend/src/UniversalApp.UITests/AppInitializer.cs:33 
  at UniversalApp.UITests.DummyTests.BeforeEachTest () [0x00001] in /Users/testing/backend/src/UniversalApp.UITests/DummyTests.cs:26 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-08/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 

When I run the sames tests on Android everything works like a charm. This happend when I did a downgrade from xcode 10.2 to 10.1 so Probably something got broken there. The strange thing however is that I can debug my iOS application without a problem.

Thanks in advance

like image 385
John Avatar asked Oct 11 '25 19:10

John


1 Answers

The cause of this problem is that Xcode 10.2 made changes to how Xamarin.UITest is able to connect with local iOS simulators; necessitating an update to Xamarin.UITest before compatibility is restored. Even though you downgraded to Xcode 10.1, the iOS simulators seemed to have kept some settings applied by Xcode 10.2 and thus continue to block testing, according to my observations when reproducing the issue.

A current version of Xamarin.UITest with support for Xcode 10.2 is not yet available, though I suspect it will be in the next release. (The newest version at the time of writing this is 2.2.7.28-dev)

This has happened previously with other Xcode updates as well:

  • "[iOS] Xcode 10.1 integration: Fixed default simulator selection" Xamarin.UITest 2.2.7
  • "[iOS] Provide support for Xcode 10" Xamarin.UITest 2.2.6
  • "[iOS] Provide support for Xcode 10 beta 6" Xamarin.UITest 2.2.5.1806-dev
  • "[iOS] Xcode 9.4.1 support" Xamarin.UITest 2.2.5
  • "[iOS] Support Xcode 9.3 and iOS 11.3" Xamarin.UITest 2.2.4
  • Etc.
like image 56
user62171 Avatar answered Oct 14 '25 19:10

user62171



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!