Xamarin UI 在 Windows 上测试 iOS [英] Xamarin UI Test iOS on Windows

查看:45
本文介绍了Xamarin UI 在 Windows 上测试 iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在 iOS 下测试我的 Xamarin 应用程序的 UI.我使用 Xamarin.UITest |为此,Visual Studio(Windows 10)上的 CrossPlatform.昨天我找到了 Android 的解决方案,现在需要它用于 iOS 模拟器.我的电脑连接到mac,我可以在模拟器中在本地机器上启动应用程序.但我无法开始 UI 测试:

公共类 AppInitializer{public static IApp StartApp(平台平台){如果(平台==平台.Android){返回配置应用程序.安卓.ApkFile(@"D:\..MyApp.apk").StartApp();}返回配置应用程序.iOS.AppBundle(@"D:\..MyApp.iOS").StartApp();}}

<块引用>

消息:SetUp:System.Exception:iOS 测试不受支持窗户.

iOS 模拟器工作正常,为什么我无法启动 UI.Test ?谢谢!

解决方案

目前无法在 Windows 上运行 UITest for iOS 应用程序,您需要在 macOS 机器上运行.

来源:https://developer.xamarin.com/guides/testcloud/uitest/working-with/testing-on-devices/ios/

您可以在此处对此功能进行投票:https://xamarin.uservoice.com/forums/144858-xamarin-platform-suggestions/suggestions/6805940-enable-running-xamarin-uitest-on-ios-device-from-v

I need testing UI of my Xamarin application under iOS. I use the Xamarin.UITest | CrossPlatform on Visual Studio (windows 10) for this. Yesterday i found the solution of Android and now need it for iOS simulator. My PC is connected to mac, and I can start application on local machine in simulator. But I can't start UI test :

public class AppInitializer
{
    public static IApp StartApp(Platform platform)
    {
        if (platform == Platform.Android)
        {
            return ConfigureApp
                .Android
                .ApkFile(@"D:\..MyApp.apk")
                .StartApp();
        }

        return ConfigureApp
            .iOS
            .AppBundle(@"D:\..MyApp.iOS")
            .StartApp();
    }
}

Message: SetUp : System.Exception : iOS tests are not supported on Windows.

iOS Simulator Work correct, why I can't start UI.Test ? Thanks!

解决方案

At the moment it's not possible to run UITest for iOS app on Windows, you need to do it on your macOS machine.

Source: https://developer.xamarin.com/guides/testcloud/uitest/working-with/testing-on-devices/ios/

You can vote on this feature here: https://xamarin.uservoice.com/forums/144858-xamarin-platform-suggestions/suggestions/6805940-enable-running-xamarin-uitest-on-ios-device-from-v

这篇关于Xamarin UI 在 Windows 上测试 iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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