xcodebuild test-without-building Transient Testing Unable to determine the executable path

Has anyone successfully used xcodebuild command test-without-building but without scheme / project?

Man pages for xcodebuild has this example:

Code Block
xcodebuild test-without-building -xctestrun MyTestRun.xctestrun -destination 'platform=iOS Simulator,name=iPhone 5s' -destination 'platform=iOS,name=My iPad'


// Tests using both the iOS Simulator and the device named iPhone 5s. Test bundle paths and other test parameters are specified in MyTestRun.xctestrun. The command requires project binaries and does not require project source code.

What I'm trying to do is automate testing app upgrades. I want to be able to archive the app and tests and run those by themselves. Then again run tests but running them using the scheme / workspace.

Like this:
  • Run previous version of app tests from archived app / test-runners / xctestrun files.

  • Run tests for current code base.

The error I'm running into from the command is this:

Cannot test target “MyTarget” on “iPhone 12 Pro Max”: Unable to determine the executable path for MyTarget.xctest

What I've done is copied build products into a new folder and tried running this command from there.

Code Block
test-without-building -xctestrun ./MyTarget-Debug_iphonesimulator14.4-x86_64.xctestrun -destination 'platform=iOS Simulator,name=iPhone 12 Pro Max'



Looks like the command you are running is missing xcodebuild, it should be:

Code Block
xcodebuild test-without-building -xctestrun ./MyTarget-Debug_iphonesimulator14.4-x86_64.xctestrun -destination 'platform=iOS Simulator,name=iPhone 12 Pro Max'




xcodebuild test-without-building Transient Testing Unable to determine the executable path
 
 
Q