Travis CI - Failed to query the list of test cases in the test bundle: Test bundle not found

264 Views Asked by At

I got this error when I run tests from travis :

Failed to query the list of test cases in the test bundle: Test bundle not found at: /Users/travis/Library/Developer/Xcode/DerivedData/MY_PROJECT/Build/Products/Debug/MY_PROJECT_TESTS.xctest

using the following travis file :

language: swift

before_install:
    - brew update
    - brew outdated xctool || brew upgrade xctool

script: xctool -workspace MY_PROJECT.xcworkspace -scheme "MY_SCHEME" run-tests

It's for an OSX/iOS app and the above xctool command works fine in my local terminal with xctool 0.3.2 and Xcode 8.3.1

Any idea of the trouble ?

thank's :)

1

There are 1 best solutions below

0
On BEST ANSWER

Ok here's what solved the problem.

You simply add to build for testing before executing tests. (which was already done in local if you ran test from Xcode once)

so add this line in the travis file before xctool run-test command :

xcodebuild -workspace MY_PROJECT.xcworkspace -scheme MY_SCHEM build-for-testing

Note that you also have to specify that your with the xcode8 or + image to support build-for-testing xcodebuild command, by adding this :

osx_image: xcode8.3