【问题标题】:Workaround for AppCenter not allowing Xamarin UI Tests to call a browser?AppCenter 的解决方法不允许 Xamarin UI 测试调用浏览器?
【发布时间】:2021-04-27 06:39:21
【问题描述】:

我正在编写 Xamarin UI 测试来测试我们的注册屏幕。作为此过程的一部分,用户必须确认他们提供的电子邮件地址是有效的。将向用户发送一封电子邮件,他们必须单击该电子邮件中的链接,然后用户才能返回我们的应用程序并继续注册过程。

在此 MS App 中心文档的 General Tips 部分中,它说...

Test can't automate multiple apps, or system apps (browser, camera, and so on). This limitation is true even for testing frameworks that allow full system control locally.

请在issue 287 中从 MS 员工那里明确 ..

Also, you noted "Browser [e.g. stock browser, safari] All", just to be clear, Xamarin.UITest can only automate your own app, and WebViews contained within your App Sandbox. If your app launches the system browser, for example; then Xamarin.UITest is not able to automate that.

我宁愿不必使用后门更改我们应用程序中的代码。 我确信我可能会遇到另一个后门无法解决的类似问题。

所以我正在寻找解决这个问题的方法,有没有人想出任何办法?

我猜这个解决方案将涉及向测试应用添加更多功能。

【问题讨论】:

    标签: c# xamarin xamarin.forms visual-studio-app-center xamarin.uitest


    【解决方案1】:

    我的计划是上传我们的应用程序的构建,以模拟与我们的 web api 的通信。或者至少你可以创建一个应用程序的构建,它指向你的 api 的一个特殊版本,它会跳过这个检查。特殊版本的 API 不用于生产,仅用于 UI 测试。

    【讨论】:

      猜你喜欢
      • 2017-05-01
      • 2022-11-01
      • 2015-10-12
      • 2015-02-21
      • 2017-01-23
      • 1970-01-01
      • 2019-05-17
      • 1970-01-01
      • 2019-05-08
      相关资源
      最近更新 更多