Linux command
infection 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Run mutation testing
infection
Run with specific threads
infection --threads=[4]
Target specific files
infection --filter=[src/Service/]
Set minimum score
infection --min-msi=[70]
Show mutations
infection --show-mutations
Output to file
infection --log-verbosity=all --logger-text=[infection.log]
说明
infection is a PHP mutation testing framework. It modifies code to test the effectiveness of your test suite. The tool creates mutants (modified code) and runs tests against them. Surviving mutants indicate weak test coverage.
参数
- --threads _N_
- Parallel execution threads.
- --filter _PATH_
- Filter source files to mutate.
- --min-msi _N_
- Minimum Mutation Score Indicator.
- --min-covered-msi _N_
- Minimum covered code MSI.
- --show-mutations
- Display mutation details.
- --mutators _LIST_
- Specific mutators to use.
- --help
- Display help information.
FAQ
What is the infection command used for?
infection is a PHP mutation testing framework. It modifies code to test the effectiveness of your test suite. The tool creates mutants (modified code) and runs tests against them. Surviving mutants indicate weak test coverage.
How do I run a basic infection example?
Run `infection` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --threads _N_ do in infection?
Parallel execution threads.