UI 测试,无法运行 iOS ui 测试 - 无法确定 X 的模拟器版本 [英] UI Test, not able to run iOS ui tests - Unable to determine simulator version for X

查看:45
本文介绍了UI 测试,无法运行 iOS ui 测试 - 无法确定 X 的模拟器版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想为 iOS 运行 UI 测试时,我收到以下消息:

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

堆栈跟踪:

  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 

当我在 Android 上运行相同的测试时,一切都像魅力一样.当我从 xcode 10.2 降级到 10.1 时发生了这种情况,所以可能有什么东西坏了.然而,奇怪的是我可以毫无问题地调试我的 iOS 应用程序.

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.

提前致谢

推荐答案

此问题的原因是 Xcode 10.2 对 Xamarin.UITest 与本地 iOS 模拟器连接方式进行了更改;在恢复兼容性之前需要更新到 Xamarin.UITest.根据我在重现问题时的观察,即使您降级到 Xcode 10.1,iOS 模拟器似乎仍保留了 Xcode 10.2 应用的一些设置,因此继续阻止测试.

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.

支持 Xcode 10.2 的 Xamarin.UITest 的当前版本尚不可用,但我怀疑它会在下一个版本中出现.(撰写本文时的最新版本是 2.2.7.28-dev)

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)

这在之前的其他 Xcode 更新中也发生过:

This has happened previously with other Xcode updates as well:

这篇关于UI 测试,无法运行 iOS ui 测试 - 无法确定 X 的模拟器版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆