HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

infection — A mutation testing framework for PHP. More information: <https://infection.github.io/guide/command-l

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandinfectionmutationframeworkcliphpfortesting

Problem

How to use the infection command: A mutation testing framework for PHP. More information: <https://infection.github.io/guide/command-line-options.html>.

Solution

infection — A mutation testing framework for PHP. More information: <https://infection.github.io/guide/command-line-options.html>.

Analyze code using the configuration file (or create one if it does not exist):
infection


Use a specific number of threads:
infection {{[-j|--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):
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 {{[-s|--show-mutations]}}


Specify the log verbosity:
infection --log-verbosity {{default|all|none}}

Code Snippets

Analyze code using the configuration file (or create one if it does not exist)

infection

Use a specific number of threads

infection {{[-j|--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)

infection --test-framework {{phpunit|phpspec}}

Context

tldr-pages: common/infection

Revisions (0)

No revisions yet.