尝试使用SBTUITestTunnel运行XCTest的EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0)

时间:2018-03-08 21:13:54

标签: ios xctest xctestcase

我正在尝试在我的XCTest UI自动化中使用测试框架SBTUITestTunnel。我按照描述设置了Podfile:

target 'MyApp' do
  pod 'SBTUITestTunnel/Server', '3.0.2'
end
target 'MyAppUITests' do
  pod 'SBTUITestTunnel/Client', '3.0.2'
end

然而,当我去运行我的UI测试时,它们会在启动后立即崩溃:

2018-03-06 17:19:01.140 MyAppUITests-Runner[64387:8057955] Running tests...
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x000000010944ba19 libsystem_trace.dylib`_os_trace_image_was_unloaded + 244
    frame #1: 0x000000010485088a dyld_sim`dyld::removeImage(ImageLoader*) + 343
    frame #2: 0x000000010485378a dyld_sim`dyld::garbageCollectImages() + 735
    frame #3: 0x0000000104857c5c dyld_sim`dlopen + 924
    frame #4: 0x00000001091ccd25 libdyld.dylib`dlopen + 59
    frame #5: 0x00000001054981c8 CoreFoundation`_CFBundleDlfcnLoadBundle + 152
    frame #6: 0x000000010549804f CoreFoundation`_CFBundleLoadExecutableAndReturnError + 335
    frame #7: 0x0000000104a363b5 Foundation`-[NSBundle loadAndReturnError:] + 547
    frame #8: 0x0000000104937127 XCTest`_XCTestMain + 514
    frame #9: 0x000000010548ab5c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    frame #10: 0x000000010546fe54 CoreFoundation`__CFRunLoopDoBlocks + 356
    frame #11: 0x000000010546f5ee CoreFoundation`__CFRunLoopRun + 894
    frame #12: 0x000000010546f016 CoreFoundation`CFRunLoopRunSpecific + 406
    frame #13: 0x0000000107d8ea24 GraphicsServices`GSEventRunModal + 62
    frame #14: 0x0000000105908134 UIKit`UIApplicationMain + 159
    frame #15: 0x0000000104845838 MyAppUITests-Runner`___lldb_unnamed_symbol8$$MyAppUITests-Runner + 42
    frame #16: 0x00000001091cf65d libdyld.dylib`start + 1

任何人都可以帮我调试吗?我甚至无法设置断点,所以我不知所措。请记住我的代码构建并开始执行。我猜测我的Podfile或我的Project配置有问题。我尝试了他们的建议没有找到框架,但它没有帮助:

  

如果您正在使用CocoaPods v1.0并且您的UI测试无法启动,那么您   可能需要将$(FRAMEWORK_SEARCH_PATHS)添加到Runpath搜索路径   在UI测试目标的构建设置中!

0 个答案:

没有答案