Skip to content

Bitrise reports test suite as passing, despite failures, when using retry_on_failure #195

@jessesquires

Description

@jessesquires

Troubleshooting

  • I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? Latest, 4.x
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? YES

Seems slightly related to #187, although that describes a different issue.

Issue description

When using test_repetition_mode: "retry_on_failure", if there are actual test failures, Bitrise reports that all tests have succeeded and the step does not fail.

- xcode-test:
  title: Unit Tests
  inputs:
  - project_path: "$WORKSPACE"
  - scheme: "$SCHEME_UNIT"
  - destination: "$DEST_IPAD"
  - test_repetition_mode: "retry_on_failure"
  - maximum_test_repetitions: 3

Bitrise info

These are the test results with retry_on_failure enabled (i.e., the configuration above). As you can see, they are incorrectly reported as "succeeded" even though there are failures.

- xcode-test:
  title: Unit Tests
  inputs:
  - project_path: "$WORKSPACE"
  - scheme: "$SCHEME_UNIT"
  - destination: "$DEST_IPAD"
  # RETRY ON FAILURE
  - test_repetition_mode: "retry_on_failure"
  - maximum_test_repetitions: 3

Screen Shot 2021-10-20 at 1 57 02 PM

These are the test results without specifying test_repetition_mode and maximum_test_repetitions. As you can see, the failure is correctly reported.

- xcode-test:
  title: Unit Tests
  inputs:
  - project_path: "$WORKSPACE"
  - scheme: "$SCHEME_UNIT"
  - destination: "$DEST_IPAD"
  # DO NOT RETRY

Screen Shot 2021-10-20 at 1 57 41 PM

Steps to reproduce

  1. Create an Xcode project with unit tests
  2. Write tests that fail
  3. Add the following to your xcode-test step:
  - test_repetition_mode: "retry_on_failure"
  - maximum_test_repetitions: 3
  1. xcode-test reports that test succeeded, despite having failures.
  2. Remove test_repetition_mode and maximum_test_repetitions
  3. Tests now report as failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions