tldr/pages/common/infection.md

37 lines
810 B
Markdown
Raw Normal View History

2018-12-22 12:11:14 +00:00
# infection
> A mutation testing framework for PHP.
2019-06-05 09:05:48 +01:00
> More information: <https://infection.github.io>.
2018-12-22 12:11:14 +00:00
2022-06-27 11:23:12 +01:00
- Analyze code using the configuration file (or create one if it does not exist):
2018-12-22 12:11:14 +00:00
`infection`
- Use a specific number of threads:
`infection --threads {{number_of_threads}}`
- 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):
2018-12-22 12:11:14 +00:00
`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:
`infection --show-mutations`
- Specify the log verbosity:
`infection --log-verbosity {{default|all|none}}`