All Projects → bitrise-steplib → steps-xcode-test

bitrise-steplib / steps-xcode-test

Licence: MIT License
Xcode Test step

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to steps-xcode-test

steps-fastlane
No description or website provided.
Stars: ✭ 33 (+26.92%)
Mutual labels:  ci, bitrise, bitrise-step, production-code
steps-cocoapods-install
No description or website provided.
Stars: ✭ 19 (-26.92%)
Mutual labels:  ci, bitrise, bitrise-step, production-code
steps-git-clone
No description or website provided.
Stars: ✭ 14 (-46.15%)
Mutual labels:  ci, bitrise, bitrise-step, production-code
steps-google-play-deploy
No description or website provided.
Stars: ✭ 40 (+53.85%)
Mutual labels:  ci, bitrise, bitrise-step, production-code
steps-carthage
Step for building dependencies with Carthage on Bitrise
Stars: ✭ 14 (-46.15%)
Mutual labels:  ci, bitrise, bitrise-step, production-code
steps-install-missing-android-tools
No description or website provided.
Stars: ✭ 14 (-46.15%)
Mutual labels:  ci, bitrise, bitrise-step, production-code
steps-ios-auto-provision-appstoreconnect
No description or website provided.
Stars: ✭ 15 (-42.31%)
Mutual labels:  ci, bitrise, bitrise-step, production-code
stepman
Step collection manager
Stars: ✭ 23 (-11.54%)
Mutual labels:  ci, bitrise, production-code
CIAnalyzer
A tool collecting multi CI services build data and export it for creating self-hosting build dashboard.
Stars: ✭ 52 (+100%)
Mutual labels:  ci, bitrise
arduino-lint
Tool to check for problems with Arduino projects
Stars: ✭ 63 (+142.31%)
Mutual labels:  ci
test-infra
Falco workflow & testing infrastructure
Stars: ✭ 18 (-30.77%)
Mutual labels:  ci
prettier-check
Check that all files match prettier code style.
Stars: ✭ 54 (+107.69%)
Mutual labels:  ci
drevops
💧 + 🐳 + ✓✓✓ + 🤖 + ❤️ Build, Test, Deploy scripts for Drupal using Docker and CI/CD
Stars: ✭ 55 (+111.54%)
Mutual labels:  ci
action-snapcraft
🐦 GitHub Action for setting up Snapcraft
Stars: ✭ 34 (+30.77%)
Mutual labels:  ci
swarmci
Swarm CI - Docker Swarm-based CI system or enhancement to existing systems.
Stars: ✭ 48 (+84.62%)
Mutual labels:  ci
update-container-description-action
github action to update a Docker Hub, Quay or Harbor repository description from a README file
Stars: ✭ 20 (-23.08%)
Mutual labels:  ci
npm-audit-ci
www.npmjs.com/package/npm-audit-ci
Stars: ✭ 18 (-30.77%)
Mutual labels:  ci
duci
The simple ci server
Stars: ✭ 73 (+180.77%)
Mutual labels:  ci
install-swift
GitHub Action to install a version of Swift 🏎
Stars: ✭ 23 (-11.54%)
Mutual labels:  ci
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-50%)
Mutual labels:  ci

Xcode Test for iOS

Step changelog

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

Description

This Steps runs all those Xcode tests that are included in your project. The Step will work out of the box if your project has test targets and your Workflow has the Deploy to Bitrise.io Step which exports the test results and (code coverage files if needed) to the Test Reports page. This Step does not need any code signing files since the Step deploys only the test results to bitrise.io.

Configuring the Step

If you click into the Step, there are some required input fields whose input must be set in accordance with the Xcode configuration of the project. The Scheme input field must be marked as Shared in Xcode.

Troubleshooting

If the Deploy to Bitrise.io Step is missing from your Workflow, then the Xcode Test for iOS Step will not be able to export the test results on the Test Reports page and you won't be able to view them either. The xcpretty output tool does not support parallel tests. If parallel tests are enabled in your project, go to the Step's Debug section and set the Log formatter input's value to xcodebuild. If the Xcode test fails with the error Unable to find a destination matching the provided destination specifier, then check our system reports to see if the requested simulator is on the stack or not. If it is not, then pick a simulator that is on the stack.

Useful links

Related Steps

🧩 Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

⚙️ Configuration

Inputs
Key Description Flags Default
project_path Xcode Project (.xcodeproj) or Workspace (.xcworkspace) path. The input value sets xcodebuild's -project or -workspace option. If this is a Swift package, this should be the path to the Package.swift file. required $BITRISE_PROJECT_PATH
scheme Xcode Scheme name. The input value sets xcodebuild's -scheme option. required $BITRISE_SCHEME
destination Destination specifier describes the device to use as a destination. The input value sets xcodebuild's -destination option. required platform=iOS Simulator,name=iPhone 8 Plus,OS=latest
test_plan Run tests in a specific Test Plan associated with the Scheme. Leave this input empty to run the default Test Plan or Test Targets associated with the Scheme. The input value sets xcodebuild's -testPlan option.
test_repetition_mode Determines how the tests will repeat. Available options: - none: Tests will never repeat. - until_failure: Tests will repeat until failure or up to maximum repetitions. - retry_on_failure: Only failed tests will repeat up to maximum repetitions. - up_until_maximum_repetitions: Tests will repeat up until maximum repetitions. The input value together with Maximum Test Repetitions (maximum_test_repetitions) input sets xcodebuild's -run-tests-until-failure / -retry-tests-on-failure or -test-iterations option. none
maximum_test_repetitions The maximum number of times a test repeats based on the Test Repetition Mode (test_repetition_mode). Should be more than 1 if the Test Repetition Mode is other than none. The input value sets xcodebuild's -test-iterations option. required 3
relaunch_tests_for_each_repetition If this input is set, tests will launch in a new process for each repetition. By default, tests launch in the same process for each repetition. The input value sets xcodebuild's -test-repetition-relaunch-enabled option. no
should_retry_test_on_fail If this input is set, the Step will rerun the tests in the case of failed tests. Note that all the tests will be rerun, not just the ones that failed. This input is not available if you are using Xcode 13+. In that case, we recommend using the retry_on_failure Test Repetition Mode (test_repetition_mode). required no
xcconfig_content Build settings to override the project's build settings. Build settings must be separated by newline character (\n). Example: COMPILER_INDEX_STORE_ENABLE = NO ONLY_ACTIVE_ARCH[config=Debug][sdk=*][arch=*] = YES The input value sets xcodebuild's -xcconfig option. COMPILER_INDEX_STORE_ENABLE = NO
perform_clean_action If this input is set, clean xcodebuild action will be performed besides the test action. required no
xcodebuild_options Additional options to be added to the executed xcodebuild command.
log_formatter Defines how xcodebuild command's log is formatted. Available options: - xcpretty: The xcodebuild command's output will be prettified by xcpretty. - xcodebuild: Only the last 20 lines of raw xcodebuild output will be visible in the build log. The raw xcodebuild log will be exported in both cases. required xcpretty
xcpretty_options Additional options to be added to the executed xcpretty command. --color --report html --output "${BITRISE_DEPLOY_DIR}/xcode-test-results-${BITRISE_SCHEME}.html"
cache_level Defines what cache content should be automatically collected. Available options: - none: Disable collecting cache content. - swift_packages: Collect Swift PM packages added to the Xcode project. swift_packages
verbose_log If this input is set, the Step will print additional logs for debugging. no
collect_simulator_diagnostics If this input is set, the simulator verbose logging will be enabled and the simulator diagnostics log will be exported. never
headless_mode In headless mode the simulator is not launched in the foreground. If this input is set, the simulator will not be visible but tests (even the screenshots) will run just like if you run a simulator in foreground. yes
Outputs
Environment Variable Description
BITRISE_XCODE_TEST_RESULT Result of the tests. 'succeeded' or 'failed'.
BITRISE_XCRESULT_PATH The path of the generated .xcresult.
BITRISE_XCRESULT_ZIP_PATH The path of the zipped .xcresult.
BITRISE_XCODE_TEST_ATTACHMENTS_PATH This is the path of the test attachments zip.
BITRISE_XCODEBUILD_BUILD_LOG_PATH If single_build is set to false, the step runs xcodebuild build before the test, and exports the raw xcodebuild log.
BITRISE_XCODEBUILD_TEST_LOG_PATH The step exports the xcodebuild test command output log.

🙋 Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Learn more about developing steps:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].