Generate Xcode-like HTML report for Unit and UI Tests with XCTestHTMLReport
Public CI on Bitrise.io
https://app.bitrise.io/app/dbb0739f4a28d789#/builds
Add this step after the Xcode Test for iOS step. This step will search for the .xcresult
file in the $BITRISE_XCRESULT_PATH
by default, because the Xcode Test for iOS step will generate it there.
You can change the search dir by modifying the test_result_path
step input.
The step will generate the test report files under the $BITRISE_DEPLOY_DIR
. If you want to make that file available on Bitrise.io add the Deploy to Bitrise.io - Apps, Logs, Artifacts step after this step.
test-simulator-html-report:
steps:
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- cache-pull: {}
- xcode-test: {}
- xctest-html-report: {}
- deploy-to-bitrise-io: {}
- cache-push: {}
Can be run directly with the bitrise CLI,
just git clone
this repository, cd
into it's folder in your Terminal/Command Line
and call bitrise run test
.
Check the bitrise.yml
file for required inputs which have to be
added to your .bitrise.secrets.yml
file!
Step by step:
- Open up your Terminal / Command Line
git clone
the repositorycd
into the directory of the step (the one you justgit clone
d)- Create a
.bitrise.secrets.yml
file in the same directory ofbitrise.yml
(the.bitrise.secrets.yml
is a git ignored file, you can store your secrets in it) - Check the
bitrise.yml
file for any secret you should set in.bitrise.secrets.yml
- Best practice is to mark these options with something like
# define these in your .bitrise.secrets.yml
, in theapp:envs
section.
- Once you have all the required secret parameters in your
.bitrise.secrets.yml
you can just run this step with the bitrise CLI:bitrise run test
An example .bitrise.secrets.yml
file:
envs:
- A_SECRET_PARAM_ONE: the value for secret one
- A_SECRET_PARAM_TWO: the value for secret two