Xcode 11.0 beta 3 - Unable to compile test target

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 tests compile and run fine from the command line.


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


1) Delete derived data

2) rm -rf .build

3) rm -rf projectName.xcodeproj

4) swift package update

5) swift test (tests compile, run and pass)

6) swift package generate-xcodeproj

7) Open project in xcode-beta

8) [Cmd]-U


Does anyone have a solution or is this a bug?

Accepted Reply

Switching to XCode 11 Toolchain (XCode -> Toolchains) resolved this issue.

Replies

Problem still occurs in Beta 4.

Switching to XCode 11 Toolchain (XCode -> Toolchains) resolved this issue.