2025-03-14 21:59:59 -06:00
|
|
|
# infection
|
|
|
|
|
|
|
|
|
|
> A mutation testing framework for PHP.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://infection.github.io/guide/command-line-options.html>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Analyze code using the configuration file (or create one if it does not exist):
|
|
|
|
|
|
|
|
|
|
`infection`
|
|
|
|
|
|
|
|
|
|
- Use a specific number of threads:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`infection {{[-j|--threads]}} {{number_of_threads}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Specify a minimum Mutation Score Indicator (MSI):
|
|
|
|
|
|
|
|
|
|
`infection --min-msi {{percentage}}`
|
|
|
|
|
|
|
|
|
|
- Specify a minimum covered code MSI:
|
|
|
|
|
|
|
|
|
|
`infection --min-covered-msi {{percentage}}`
|
|
|
|
|
|
|
|
|
|
- Use a specific test framework (defaults to PHPUnit):
|
|
|
|
|
|
|
|
|
|
`infection --test-framework {{phpunit|phpspec}}`
|
|
|
|
|
|
|
|
|
|
- Only mutate lines of code that are covered by tests:
|
|
|
|
|
|
|
|
|
|
`infection --only-covered`
|
|
|
|
|
|
|
|
|
|
- Display the mutation code that has been applied:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`infection {{[-s|--show-mutations]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Specify the log verbosity:
|
|
|
|
|
|
|
|
|
|
`infection --log-verbosity {{default|all|none}}`
|