2016-11-23 59 views
0

我是Xamarin的新手,嘗試在Xamarin網站上爲iOS平臺上的UITest運行演示。網頁鏈接是:https://developer.xamarin.com/guides/testcloud/uitest/quickstarts/ios/。 實際上我無法運行UI測試,即使在沒有問題的情況下構建項目。 任何人都可以幫忙?謝謝!無法在Xamarin Studio運行簡單的演示UITest for IOS在Xamarin Studio

以下是錯誤信息:

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 

回答

0

我使用Xamarin測試雲Xamarin的Android UITest和xamarin IOS項目中運行。我已經嘗試了兩個。對於Xamarin.ios項目,我的設置方法如下所示,

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

按照默認的UITest指示,您需要執行以下步驟。 編輯AppDelegate類並添加以下代碼段到FinishedLaunching方法...

的#if ENABLE_TEST_CLOUD
Xamarin.Calabash.Start();
#ENDIF

確保您加入「ENABLE_TEST_CLOUD」調試變量項目的調試配置,或者如果刪除,END(總是允許Xamarin.calabash.start()。 和發佈UiTest到xamarin從發佈的配置構建雲測試。 只要確保在這種情況下,刪除上述語句時,你submiiting您的應用程序的應用程序商店。

在(的Xamarin工作室)單元測試窗口,添加iOS應用程序,然後運行與測試雲測試。讓確保你有xamarin帳戶在測試雲上運行測試。

然後它詢問設備將運行測試。你可以選擇1或多個。