2

I am trying to run the demo for UITest on iOS platform here. I can not run the UI test, even though building the project without a problem.

This is the error information:

SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to launch simulator

ExitCode: 134
2016-11-23 12:00:01.767 iOSDeviceManager[36474:1504101] CoreSimulator: Loading from /Applications/Xcode 8.2-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework 
2016-11-23 12:00:01.772 iOSDeviceManager[36474:1504101] CoreSimulator: Successfully loaded
2016-11-23 12:00:01.773 iOSDeviceManager[36474:1504101] CoreSimulator: SimDevice has correct path of /Applications/Xcode 8.2-beta.app
2016-11-23 12:00:01.773 iOSDeviceManager[36474:1504101] SimulatorKit: Loading from /Applications/Xcode 8.2-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework 
2016-11-23 12:00:01.795 iOSDeviceManager[36474:1504101] SimulatorKit: Successfully loaded
2016-11-23 12:00:01.795 iOSDeviceManager[36474:1504101] SimulatorKit: SimDeviceFramebufferService has correct path of /Applications/Xcode 8.2-beta.app
2016-11-23 12:00:01.796 iOSDeviceManager[36474:1504101] Loaded All Private Frameworks [CoreSimulator, SimulatorKit]
2016-11-23 12:00:01.883 iOSDeviceManager[36474:1504101] Completed Pool Preconditons
2016-11-23 12:00:01.939 iOSDeviceManager[36474:1504101] *** Assertion failure in -[FBSimulatorConfiguration initWithNamedDevice:os:auxillaryDirectory:], /Users/chrisf/FBSimulatorControl/FBSimulatorControl/Configuration/FBSimulatorConfiguration.m:32
2016-11-23 12:00:02.056 iOSDeviceManager[36474:1504101] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: os'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff832256fb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fff97a2ca2a objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff8322a252 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fff84c7d390 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
    4   FBSimulatorControl                  0x000000010d2cef3f -[FBSimulatorConfiguration initWithNamedDevice:os:auxillaryDirectory:] + 444
    5   FBSimulatorControl                  0x000000010d2cf0a3 __48+[FBSimulatorConfiguration defaultConfiguration]_block_invoke + 108
    6   libdispatch.dylib                   0x00007fff982d3128 _dispatch_client_callout + 8
    7   libdispatch.dylib                   0x00007fff982d30e5 dispatch_once_f + 38
    8   FBSimulatorControl                  0x000000010d2cf034 +[FBSimulatorConfiguration defaultConfiguration] + 45
    9   FBSimulatorControl                  0x000000010d2fc253 +[FBSimulatorConfiguration(CoreSimulator) inferSimulatorConfigurationFromDevice:error:] + 347
    10  FBSimulatorControl                  0x000000010d2f657f +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 178
    11  FBSimulatorControl                  0x000000010d2f8157 -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 810
    12  FBSimulatorControl                  0x000000010d2f7db8 -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 891
    13  FBSimulatorControl                  0x000000010d2d615d -[FBSimulatorSet allSimulators] + 129
    14  FBSimulatorControl                  0x000000010d2d45d5 -[FBSimulatorSet query:] + 108
    15  iOSDeviceManager                    0x000000010d1609c1 +[Simulator simulatorWithDeviceID:] + 238
    16  iOSDeviceManager                    0x000000010d1614f5 +[Simulator launchSimulator:] + 88
    17  iOSDeviceManager                    0x000000010d161ec7 +[LaunchSimulatorCommand execute:] + 74
    18  iOSDeviceManager                    0x000000010d15cd4a +[CLI process:] + 1171
    19  iOSDeviceManager                    0x000000010d121504 main + 104
    20  libdyld.dylib                       0x00007fff98309255 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Iain Smith
  • 9,230
  • 4
  • 50
  • 61
funkyxym
  • 61
  • 1
  • 5

1 Answers1

0

I am using Xamarin test cloud to run UITest of Xamarin android and xamarin ios project. I have tried both. For Xamarin.ios project, my setup method looks like below,

app = ConfigureApp .iOS .PreferIdeSettings() .StartApp();

As instructed in default UITest, you need to perform below steps. Edit the AppDelegate class and add the following snippet to the FinishedLaunching method...

#if ENABLE_TEST_CLOUD
Xamarin.Calabash.Start();
#endif

Make sure you are adding "ENABLE_TEST_CLOUD" debug variable in debug configuration of project or remove if, endif (always allow Xamarin.calabash.start(). and post the UiTest to xamarin test cloud from release configuration build. Just make sure in this case, remove above statement when you are submiiting your app to app store.

In unit test window (of Xamarin studio), add ios app and then run the test with test cloud. Make sure you have xamarin account to run test on test cloud.

Then it asks devices on which test will be running. You can select 1 or many.