【问题标题】:"Unable to contact test backend running in app" when trying to run Xamarin UITest locally尝试在本地运行 Xamarin UITest 时“无法联系在应用程序中运行的测试后端”
【发布时间】:2020-06-29 02:18:48
【问题描述】:

我正在学习如何为我的公司自动化 Xamarin 应用程序。我一开始只是从 Microsoft 克隆了 TailWind Traders 应用程序,以确保我的系统配置正确,但我遇到了问题。在修改 AppManager.cs 以使用 .app 文件并尝试运行单个 iOS 测试后,我看到模拟器中的应用程序加载,我收到一条 Mac 警报,说“你希望应用程序 'DeviceAgent-Runner.app' 接受传入网络传输”,然后测试失败并显示以下消息:

System.Exception : Unable to contact test backend running in app. Check that your app is running and that it is properly configured:

For Xamain.iOS applications,  https://docs.microsoft.com/en-us/appcenter/test-cloud/preparing-for-upload/xamarin-ios-uitest

For native iOS applications,  https://github.com/calabash/calabash-ios/wiki/Tutorial%3A-How-to-add-Calabash-to-Xcode

访问该网站,我看到它正在帮助用户配置运行测试 AppCenter,但我不想这样做。我只是想在我的机器上本地运行一个测试。在尝试解决此问题时,我卸载了 Xamarin 测试云代理程序包并从 AppDelegate.cs 中删除了 #if ENABLE_TEST_CLOUD 块。但是,它仍在发生。如何在本地运行 iOS 测试?谢谢!

【问题讨论】:

    标签: xamarin xamarin.ios xamarin.uitest


    【解决方案1】:

    如果您想使用 xamarin 自动化 uitest,则需要在您的 xamarin ios 项目中添加测试云代理 nuget,以启用链接到 Calabash 并在您的手机中安装设备代理运行程序。有关更多详细信息,请访问 Microsoft 网站。 https://docs.microsoft.com/en-us/appcenter/test-cloud/uitest/preparing-for-upload-ios

    无论您是在应用程序输入上上传测试还是在本地运行它。您必须在 xamarin ios 中添加测试云代理 nuget。如果您使用的是原生 iOS,Calabash 链接需要运行 xamarin uitest。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-10
      • 1970-01-01
      • 1970-01-01
      • 2021-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多