Error running xcodebuild test-without-build -xctestrun on other machines.

I have generated a .xctestrun file using "build for Testing" on a MacOS 64 bit application. My tests are UI tests only. I can go to terminal and run


xcodebuild test-without-building -xctestrun Application_macosx10.14-x86_64.xctestrun -destination 'platform=MacOS,arch=x86_64'


It runs all the UI tests and works great.


The problem I'm having is using this same Application_macosx10.14-x86_64.xctestrun on a different machine. We'd like to be able to run these UI tests on a Mac 10.12 Sierra machine. I copied the .xctestrun and the directories with the test runner and applicaiton and tests to the Sierra machine. I installed Xcode 9.2 and the command line tools. I open terminal in the directory where the .xctestrun file is and run


xcodebuild test-without-building -xctestrun Application_macosx10.14-x86_64.xctestrun -destination 'platform=MacOS,arch=x86_64'


I get the following error:


User defaults from command line:

IDETestRunSpecificationPath = /Users/sysqa/Desktop/UI Tests Release/build/Application_macosx10.14-x86_64.xctestrun


xcodebuild: error: Failed to build workspace temporary with scheme Transient Testing.

Reason: Validation for test run specification failed: TestBundlePath should be provided; TestHostPath should be provided; DYLD_FRAMEWORK_PATH should be provided in testing environment variables; DYLD_LIBRARY_PATH should be provided in testing environment variables


It looks like XCode 9.2 supportsthe test-without-building and -xctestrun options but doesn't like the .xctestrun file becuase all the things it's asking for are in the Application_macosx10.14-x86_64.xctestrun. Is there some difference between the format of the .xctestrun file between XCode 9.2 and 10.2? Is it possible to run these tests on other machines using the same .xctestrun file?

Replies

I have the same issue. Have you managed to solve this?