Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@juergba
Copy link
Contributor

@juergba juergba commented Aug 12, 2021

Description

We add a new option --fail-zero which exits the test script with exit-code: 1 when no test have been found. Currently the exit-code would be zero. This flag is especially useful for CI/CD environments to prevent bugs remaining undetected.

Description of the Change

New option fail-zero:

  • boolean
  • default: false

Before an EVENT_RUN_END event is emitted, we set runner.failures = 1. That way the script exits with exit-code: 1

Applicable issues

closes #4062

@juergba juergba self-assigned this Aug 12, 2021
@juergba juergba marked this pull request as ready for review August 12, 2021 16:06
@juergba juergba added type: feature enhancement proposal semver-minor implementation requires increase of "minor" version number; "features" labels Aug 12, 2021
@juergba juergba added this to the next milestone Aug 12, 2021
@juergba juergba requested a review from a team August 12, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minor implementation requires increase of "minor" version number; "features" type: feature enhancement proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to fail if no tests are run

2 participants