Hey,
I just saw the new testing library in the latest WWDC video, so I created a new Swift Package using the builtin template of Xcode 16, added #expect(false) and executed swift test.
Unfortunately, the tests aren't executed. Did I miss something or is there no SPM support yet? It does work using Xcode.
Test Suite 'All tests' started at 2024-06-11 22:01:32.098.
Test Suite 'All tests' passed at 2024-06-11 22:01:32.099.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
Thank you! I just noticed, the bottom line still shows:
✘ Test example() failed after 0.001 seconds with 1 issue.
✘ Test run with 1 test failed after 0.001 seconds with 1 issue.
Building for debugging...
[3/3] Linking MyLibraryPackageTests
Build complete! (0.39s)
Test Suite 'All tests' started at 2024-06-11 23:33:47.473.
Test Suite 'All tests' passed at 2024-06-11 23:33:47.474.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
Is this (the last line) also a known bug and tracked internally?
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
That line is expected because it's emitted by XCTest and is referring to XCTest content specifically. Swift Testing runs first, finishes, then XCTest runs. Neither library is aware of output from the other.
Could I ask you to use Apple's Feedback Assistant to file feedback letting Apple know the output is confusing? Let me know the FB number here and I'll make sure we investigate further. Thanks!