开发者社区> 问答> 正文

XCTCapabilitiesBuilder导致应用程序单元测试在启动时终止

是否有人遇到过下列单元测试终止日志?测试总是在IOS 11和12模拟器上终止,但可以在IOS 13模拟器上运行。

我试过的是:

1.Xcode 11.2.1,11.3 beta版(11C24b) 2.禁用所有单元测试 3.注释所有函数调用didFinishLaunchingWithOptions 4.我的单元测试框架:kiwi for obj-c

是否有关于XCTCapabilitiesBuilder相关错误报告的信息?谢谢!

Application Specific Information:
dyld: in dlopen()
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Capability 'request background assertion capability' has already been registered.'
terminating with uncaught exception of type NSException
abort() called
CoreSimulator 681.17 - Device: iPhone Xs Max (B8A78910-3636-4707-8E4E-5AC780B103B3) - Runtime: iOS 12.4 (16G73) - DeviceType: iPhone Xs Max

Application Specific Backtrace 1:
0   CoreFoundation                      0x000000010eeef8db __exceptionPreprocess + 331
1   libobjc.A.dylib                     0x000000010ddadac5 objc_exception_throw + 48
2   CoreFoundation                      0x000000010eeef662 +[NSException raise:format:arguments:] + 98
3   Foundation                          0x000000010adb276b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4   XCTAutomationSupport                0x0000000133f2e8f9 -[XCTCapabilitiesBuilder registerCapability:version:] + 528
5   XCTAutomationSupport                0x0000000133f2e9ab -[XCTCapabilitiesBuilder upgradeCapability:toVersion:] + 126
6   XCTest                              0x0000000133db131d XCTDaemonCapabilitiesBuilder_IOS_v6 + 58
7   XCTest                              0x0000000133db1248 XCTDaemonCapabilitiesBuilder_IOS_v12 + 15
8   XCTest                              0x0000000133db1193 XCTDaemonCapabilitiesBuilder_IOS_v18 + 15
9   XCTest                              0x0000000133db10f8 XCTDaemonCapabilitiesBuilder_IOS_v22 + 15
10  XCTest                              0x0000000133db1074 XCTDaemonCapabilitiesBuilder_IOS_v26 + 12
11  XCTest                              0x0000000133db0bba +[XCTRunnerDaemonSession daemonCapabilitiesForProtocolVersion:platform:error:] + 62
12  XCTest                              0x0000000133dafa06 +[XCTRunnerDaemonSession capabilitiesForDaemonConnection:error:] + 252
13  XCTest                              0x0000000133daf7a6 __39+[XCTRunnerDaemonSession sharedSession]_block_invoke + 95
14  libdispatch.dylib                   0x0000000111b7cd02 _dispatch_client_callout + 8
15  libdispatch.dylib                   0x0000000111b7e4cd _dispatch_once_callout + 20
16  XCTest                              0x0000000133daf745 +[XCTRunnerDaemonSession sharedSession] + 101
17  XCTest                              0x0000000133dc181e __80+[XCTRunnerIDESession daemonMediatedSessionForSessionIdentifier:delegate:error:]_block_invoke + 52
18  XCTest                              0x0000000133d3a769 +[XCTFuture futureWithTimeout:description:block:] + 211
19  XCTest                              0x0000000133dc164d +[XCTRunnerIDESession daemonMediatedSessionForSessionIdentifier:delegate:error:] + 187
20  XCTest                              0x0000000133db5f4a _XCTestMain + 858
21  libXCTestBundleInject.dylib         0x000000010973abe7 __copy_helper_block_e8_32s + 0
22  CoreFoundation                      0x000000010ee56cbc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
23  CoreFoundation                      0x000000010ee56480 __CFRunLoopDoBlocks + 336
24  CoreFoundation                      0x000000010ee50d04 __CFRunLoopRun + 1252
25  CoreFoundation                      0x000000010ee504d2 CFRunLoopRunSpecific + 626
26  GraphicsServices                    0x00000001130722fe GSEventRunModal + 65
27  UIKitCore                           0x00000001196fbfc2 UIApplicationMain + 140
28  MyApp                               0x0000000106a84ff9 main + 137
29  libdyld.dylib                       0x0000000111bea541 start + 1

展开
收起
游客5akardh5cojhg 2019-12-09 00:08:44 699 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
用AI 高效测试移动应用 立即下载
移动互联网测试到质量的转变 立即下载
给ITer的技术实战进阶课-阿里CIO学院独家教材(四) 立即下载