facebookarchive / xctool

An extension for Apple's xcodebuild that makes it easier to test iOS and macOS apps.
Apache License 2.0
6.91k stars 738 forks source link

Failed to query the list of test cases in the test bundle #745

Closed haithngn closed 6 years ago

haithngn commented 6 years ago

I have a problem when run this command:

xctool -project Flo.xcodeproj -scheme FloTests -launch-timeout 3600 -sdk iphonesimulator11.1 run-tests

//Xcode 9.1, xctool latest

Output:

Failed to query the list of test cases in the test bundle: Test bundle not found at: /Users/hai/Library/Developer/Xcode/DerivedData/Flo-astgszcxfaqafmdpwhbksfkxandk/Build/Products/Debug-iphonesimulator/Flo.app/PlugIns/FloTests.xctest

After that I open the xcode project then try Compile/Run the FloTests succeed. I run this command agains, it works :(:

xctool -project Flo.xcodeproj -scheme FloTests -launch-timeout 3600 -sdk iphonesimulator11.1 run-tests

Am I do wrong ?

ExtremeMan commented 6 years ago

You need to build tests first using xcodebuild, for example:

xcodebuild -project Flo.xcodeproj -scheme FloTests -sdk iphonesimulator11.1 build-for-testing
haithngn commented 6 years ago

thanks @ExtremeMan