Xamarin UI 在 Windows 上测试 iOS

Xamarin UI Test iOS on Windows

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

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 模拟器工作正常,为什么我无法启动 UI.Test? 谢谢!

目前无法在 Windows 上对 iOS 应用进行 运行 UITest,您需要在您的 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