This is an xcode not a "swift" issue; the tests compile and run fine from the command line. I've posted in the developer xcode forum; I'm cross posting here on the off chance someone has bumped into this and knows a work around.
I get the following errors when attempting to compile and run my tests within XCode:
XCUIElement' is not a member type of 'XCTest'
'XCUIKeyboardKey' is not a member type of 'XCTest'
'XCTActivity' is not a member type of 'XCTest'
Failed to load module 'XCTest'
The procedure I used:
swift -version
Apple Swift version 5.1 (swiftlang-1100.0.212.5 clang-1100.0.28.2)
Target: x86_64-apple-darwin18.6.0
In Xcode 11.0 beta 4:
- Delete derived data
- rm -rf .build
- rm -rf projectName.xcodeproj
- swift package update
- swift test (tests compile, run and pass)
- swift package generate-xcodeproj
- Open project in xcode-beta
- [Cmd]-U