-
Bug
-
Resolution: Unresolved
-
Major
Plugin version: 2.0.6
Xcode version: 11.3.1
Issue:
I am following the exact same steps to set up unit tests via Xcode plugin but it doesn't work. Throws the error saying:
{{xcodebuild: error: Failed to build workspace MyWorkspace with scheme My-scheme.Reason: The scheme 'My-scheme' is not configured for Running.
It runs perfectly while using xcodebuild test CLI command but I would like to see if it is possible via Plugin to maintain consistency. }}
Setting up a unit test step
Add the XCode build step and this time specify your unit test target (e.g. MyAppTests), configuration (e.g. Debug) and the SDK (e.g. Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/).
Leave all the checkboxes unselected. The SDK needs to be supplied here as the unit tests will only be run when building under the simulator's SDK.
Hello.
+1 about this issue.
I currently use this command line to run unit test. I'ld like to use the XCode Plugin instead.
xcodebuild -workspace 'myproject.xcworkspace' -scheme "myprojectTests" -destination "name=iPhone 11,OS=13.3" -enableCodeCoverage YES ONLY_ACTIVE_ARCH=YES test
So i have the same issue while launching with plugin DSL method :
xcodeBuild(
xcodeSchema: "myprojectTests",
xcodeName: 'latest',
configuration: 'Debug',
xcodeWorkspaceFile: 'myproject',
sdk: 'iphonesimulator13.2',
xcodebuildArguments: "test -destination \"name=iPhone 11\" -enableCodeCoverage YES",
resultBundlePath: 'test-result',
)
In fact, by default, the "build" parameters is added in xcodebuild command instead of "test".
Can you confirm this is an issue ?
I can eventually fix and create a PR to fix this issue.
Thank you.