icon

Xcode Test for Mac

Runs Xcode's test action for macOS app projects.

This Step runs your pre-defined tests, and the Deploy to Bitrise.io Step deploys your test results to Bitrise. You don't have to upload code signing files for this. However, if you set a team for your project locally, in Xcode, then Xcode will ask for that team’s Developer certificate before running the test.

Configuring the Step

This Step has a default configuration that does not need to be modified, which means that if pre-defined tests are written correctly, they will work. Here is a rundown of the inputs should you wish to modify them.

  1. Add the path of your project in the Project (or Workspace) path input.
  2. Add the scheme name in the Scheme name input. Please note the scheme has to be marked as shared in Xcode.
  3. Add the device or simulator on which the app will run in the Destination input, for example, platform=OS X,arch=x86_64.
  4. Set the Should a clean Xcode build run before testing? input to yes to run a clean build without cache.
  5. Select yes in Generate code coverage files? input if you wish to get code coverage analysis of your tests.
  6. If you wish to use xcpretty formatter for your xcodebuild as an output tool, select xcpretty in the Output tool input. If this input is set to xcodebuild, the raw xcodebuild output gets printed.
  7. Add extra options to the end of the xcodebuild call in the Additional options for xcodebuild call input. Use multiple options separated by a space character, for example, -xcconfig PATH -verboseAdditional.
  8. Set the Disable indexing during the build input to yes to speed up your build.

Troubleshooting

If your app does not have test targets defined, the primary workflow will be the only automatically created workflow and it will NOT include the Xcode Test for Mac Step.

Useful links

Related Steps

Similar steps

Runs Test on your macOS project with Swift Package Manager

Runs your project's pre-defined Xcode tests on every build.

Calculates the test shards for your Xcode tests.

Tests compiled bundles.