|
5 | 5 | [](https://www.php.net/downloads) |
6 | 6 | [](https://github.com/itk-dev/openid-connect-bundle/actions/workflows/php.yaml?query=branch%3Adevelop) |
7 | 7 | [](https://codecov.io/gh/itk-dev/openid-connect-bundle) |
| 8 | +[](https://dashboard.stryker-mutator.io/reports/github.com/itk-dev/openid-connect-bundle/develop) |
8 | 9 | [](https://github.com/itk-dev/openid-connect-bundle/blob/master/LICENSE.md) |
9 | 10 | [](https://packagist.org/packages/itk-dev/openid-connect-bundle/stats) |
10 | 11 |
|
@@ -472,6 +473,27 @@ task test:matrix |
472 | 473 | This runs PHPUnit with coverage for each combination and prints a summary of |
473 | 474 | pass/fail results. |
474 | 475 |
|
| 476 | +### Mutation Testing |
| 477 | + |
| 478 | +Line coverage shows which code the tests *execute*; mutation testing shows |
| 479 | +which code they actually *verify*. [Infection](https://infection.github.io/) |
| 480 | +applies small changes (mutants) to the source code — flipping a comparison, |
| 481 | +removing a method call — and runs the test suite against each one. If the |
| 482 | +tests still pass, the mutant "escaped": a potential bug the tests would not |
| 483 | +catch. |
| 484 | + |
| 485 | +```shell |
| 486 | +task test:mutation |
| 487 | +``` |
| 488 | + |
| 489 | +The minimum mutation score (`minCoveredMsi`) is defined in `infection.json5` |
| 490 | +and enforced both locally and in CI — no command line flags needed. CI |
| 491 | +annotates escaped mutants inline on pull requests, and results for `develop` |
| 492 | +are published to the |
| 493 | +[Stryker dashboard](https://dashboard.stryker-mutator.io/reports/github.com/itk-dev/openid-connect-bundle/develop), |
| 494 | +which also feeds the mutation score badge above. Detailed reports are written |
| 495 | +to `infection.log` and `infection.html` on each run. |
| 496 | + |
475 | 497 | ### PHPStan Static Analysis |
476 | 498 |
|
477 | 499 | ```shell |
@@ -510,7 +532,8 @@ Run `task --list` to see all available tasks. |
510 | 532 |
|
511 | 533 | ## CI |
512 | 534 |
|
513 | | -GitHub Actions are used to run the test suite and code style checks on all PRs. |
| 535 | +GitHub Actions are used to run the test suite, mutation tests and code style |
| 536 | +checks on all PRs. |
514 | 537 |
|
515 | 538 | ## Versioning |
516 | 539 |
|
|
0 commit comments