Skip to content

Add a --fail-on-skipped option #2840

@soullivaneuh

Description

@soullivaneuh

Currently, we can make PHPUnit failing on warning and failed tests, but not on skipped ones.

We can only make PHPUnit stop, but with no error code:

$ phpunit --fail-on-warning tests/AppBundle/Security/

 // Clearing the cache for the test environment with debug true                                                         

 [OK] Cache for the "test" environment (debug=true) was successfully cleared.                                           

PHPUnit 6.3.1 by Sebastian Bergmann and contributors.

S.....                                                              6 / 6 (100%)

Time: 3.02 seconds, Memory: 50.00MB

OK, but incomplete, skipped, or risky tests!
Tests: 6, Assertions: 34, Skipped: 1.

I would like to make PHPUnit failing on skipped test to ensure the CI job as no skipped job (because the needed env should be complete).

Having a --fail-on-skipped option would be a great addition.

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions