Xamarin not starting remotely on mac agent from windows: "iOS tests are not supported on Windows"

916 views Asked by At

I'm writing mobile autotests in Visual Studio 2015, C#, Xamarin 6.1.3., iOS 10.2, iPhone 6s Plus, Xcode 8.2. And trying to launch autotests remotely from windows 10 on Mac Agent (OS X El Capitan 10.11.6). I've setup remote connection in VS, so xamarin Mac Agent is connected: mac agent is connected This is how i'm trying to launch application in my code:

IApp iApp = ConfigureApp
                .iOS
                .DeviceIp(mac_ip)
                .DeviceIdentifier(iphone_device_identifier)
                .AppBundle(/path_to_ipa/application.ipa)
                .Debug()
                .StartApp();

Test fails on the StartApp() method with message "iOS tests are not supported on Windows.":

at Xamarin.UITest.iOS.iOSApp..ctor(IiOSAppConfiguration appConfiguration)
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp(AppDataMode appDataMode)
at Xamarin.Application.Initialize() in D:\_framework mobile\framework\Framework\Xamarin\Application.cs:line 30
at Xamarin.Application..ctor() in D:\_framework mobile\framework\Framework\Xamarin\Application.cs:line 22
at Xamarin.Application.GetInstance() in D:\_framework mobile\framework\Framework\Xamarin\Application.cs:line 54
at Specflow.Hooks.BaseSteps.StartApplication() in D:\_framework mobile\framework\Framework\Specflow.Hooks\BaseSteps.cs:line 19
at lambda_method(Closure , IContextManager )
at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType bindingEvent)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnScenarioStart(ScenarioInfo scenarioInfo)
at TechTalk.SpecFlow.TestRunner.OnScenarioStart(ScenarioInfo scenarioInfo)
at Specflow.Features.DemoFeatureFeature.ScenarioSetup(ScenarioInfo scenarioInfo)
at Specflow.Features.DemoFeatureFeature.AddTwoNumbers() in D:\_framework mobile\framework\Framework\Specflow.Features\DemoFeature.feature:line 7
Result Message: 
Test method Specflow.Features.DemoFeatureFeature.AddTwoNumbers threw exception: 
System.Exception: iOS tests are not supported on Windows.

Earlier i've launched the same application using appium on the same device and mac - everything was OK.

I haven't specified .DevicePort() because i don't know how to get the port, but i guess it's not neccessary when only 1 device is connected.

Also I've tried to launch in simulator, but i've got the same error.

1

There are 1 answers

0
alex On

Running iOS Xamarin.UITests from Windows using the Mac Agent is not supported. Source: https://forums.xamarin.com/discussion/71138/how-to-run-test-using-vs-on-ios-simulator-on-mac#latest