Question:I’m trying to implement danger-swift but I don’t know where I can access test results and flag failing ones from Bitrise.
I’m using a plugin for danger-swift called DangerXCodeSummary but I don’t know where Bitrise stores test results from xcode-test@2.
Best Answer:You can see what outputs the step generates on the Workflow Editor UI, and alternatively in the Step’s repository in
step.yml. For Xcode Test step specifically: https://github.com/bitrise-steplib/steps-xcode-test/blob/deb39d7e9e055a22f33550ed3110fb3c71beeb79/step.yml#L287
Am I right that you’re looking for the
xcresulttest output? If you are, you can read it from the
BITRISE_XCRESULT_PATHenvironment variable (https://github.com/bitrise-steplib/steps-xcode-test/blob/deb39d7e9e055a22f33550ed3110fb3c71beeb79/step.yml#L296), which is the output of Xcode Test (once Xcode Test is finished, it sets this environment variable to the
xcresult‘s path). Keep in mind this is in
.xcresultformat (the official Xcode test result format).
If you have better answer, please add a comment about this, thank you!