2

I'm trying to use the test framework SBTUITestTunnel in my XCTest UI automation. I have the Podfile set up as described:

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

However when I go to run my UI tests, they crash right after launching:

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

Can anyone help me debug this? I can't even set a breakpoint, so I'm at a loss. Keep in mind my code builds and starts executing. I'm guessing something is either wrong with my Podfile or with my Project config. I tried their suggestion for Framework not found but it didn't help:

If you’re using CocoaPods v1.0 and your UI Tests fail to start, you may need to add $(FRAMEWORK_SEARCH_PATHS) to your Runpath Search Paths in the Build Settings of the UI Test target!

Funktional
  • 4,083
  • 1
  • 30
  • 27

0 Answers0