Unable to run tests in iOS on Mac

I have written few tests to learn about UITest. All were debugged and run successfully in Android on Windows using Visual Studio 2017. So I moved the project to Mac and tried to run the same tests for iOS using Xamarin Studio. But it is resulting in errors as follows. What am I missing?

The "Application Output - Unit Tests":
Full log file: /var/folders/tg/r4xwhcyx5cvdy03khqxzcdgc0000gn/T/uitest/log-2017-05-29_19-36-42-306.txt

iOS test running Xamarin.UITest version: 2.0.7

Attempting IDE connection through pipe f5eee8eb5c6044068dfa232036284c2f.

Skipped IDE integration, connection failed.

Skipping local screenshots. Can be enabled with EnableScreenshots() when configuring app.

The "Test Results":
SetUp : System.Exception : Must have either installed app or app bundle.
Stack trace:
at Xamarin.UITest.Configuration.iOSAppConfiguration.Verify () [0x00077] in <4e019f0139bb4268a81c60c63691d2a5>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x002d8] in <4e019f0139bb4268a81c60c63691d2a5>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <4e019f0139bb4268a81c60c63691d2a5>:0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <4e019f0139bb4268a81c60c63691d2a5>:0
at TestUx.UITest.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x00027] in /Users/shantimohan/Dropbox/XPAs/Samples/TestUX/TestUx.UITest/AppInitializer.cs:22
at TestUx.UITest.Tests.BeforeEachTest () [0x00001] in /Users/shantimohan/Dropbox/XPAs/Samples/TestUX/TestUx.UITest/Tests.cs:25
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

Best Answer

  • ShantimohanElchuriShantimohanElchuri US ✭✭✭✭✭
    Accepted Answer

    Solved it myself after getting clue from some other thread.

    The solution is to set ConfigureApp.AppBundle("../../../... path to .exe in the iPhoneSimulator/bin ...").

Answers

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    Any takers???

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭
    Accepted Answer

    Solved it myself after getting clue from some other thread.

    The solution is to set ConfigureApp.AppBundle("../../../... path to .exe in the iPhoneSimulator/bin ...").

  • Yes, I have something like...

    app = ConfigureApp.iOS.AppBundle(path).DeviceIdentifier("981CCFBF-EE33-49CA-B14A-CD01BE87021B").StartApp();

    Where the device identifier gives you the device version. You can run 'instruments -s devices' to find out the device ID's.

Sign In or Register to comment.