I’ve got a pipeline that runs three sets of iOS UI tests (different test plans)
If I have a custom-test-results-export
step after each test run I end up with 6 test results listed on the Test Reports page. The first test run gets listed thrice, the second run twice and the third run once, so it’s uploading prior tests each time. This is a little odd as I’m clearing the test results folder between test runs, so I guess the step must be caching the prior results somewhere and including them in subsequent uploads.
I tried with just a single custom-test-results-export
step after all the test runs but that results in just one of the results being selected as the step only wants to handle one set of test results (Allow for multiple matches in step-custom-test-results-export step could resolve this specific issue)
Example of the step yml (bits in angle brackets redacted for simplicity):
- script@1.2.0:
title: "UI Tests"
inputs:
- content: |-
# Delete the previous logs (to prevent duplicates being uploaded)
rm -rf <log path>
<run test plan>
- custom-test-results-export@0:
title: "Upload test results"
inputs:
- base_path: "$BITRISE_SOURCE_DIR/<log path>"
- search_pattern: "*"
- test_name: <test name>
- deploy-to-bitrise-io@2:
title: "Archive xcresult"
inputs:
- deploy_path: "$BITRISE_SOURCE_DIR/<log path>"
- is_compress: true
- is_enable_public_page: false
- notify_user_groups: none
- zip_name: <test name>_xcresult