XCTests are failing with the message: *** Canceling tests due to timeout in Waiting for test process to check in...
This just started coming up in the last few days
The problem lies in the fact (or rather: serious bug in xcodebuild) that the timeout for connecting to the XCTest server starts at the moment you issue the command xcodebuild. The timeout is 120 seconds, so if your compilation + startup of the simulator takes longer than 2 minutes xcodebuild will give this "Canceling tests due to timeout" error.
The solution is to break up the build into two commands. One for building and one for running the tests:
> xcodebuild clean build build-for-testing
> xcodebuild test-without-building
This will solve the timeout issue, because the test-without-building action doesn't have to compile first.