mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Update documentation for Infection (Mutation Testing) and use the "nproc" command that returns the number of processors available
This commit is contained in:
@@ -105,20 +105,22 @@ docker-compose exec php phing -f phing/tests.xml test:phpunit
|
|||||||
docker-compose run --rm phpunit --verbose --no-coverage
|
docker-compose run --rm phpunit --verbose --no-coverage
|
||||||
```
|
```
|
||||||
|
|
||||||
# Mutation Tests
|
# Infection - Mutation Testing
|
||||||
|
|
||||||
Served by [Infection — Mutation Testing Framework](https://infection.github.io).
|
Served by [Infection — Mutation Testing Framework](https://infection.github.io).
|
||||||
|
|
||||||
### Running tests
|
### Running tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose exec php vendor/bin/infection --threads=5
|
$ docker-compose exec php bash
|
||||||
|
root@18f2f0cfaa5d:/var/www/application# XDEBUG_MODE=coverage ./vendor/bin/infection --threads=$(nproc)
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose exec php phing -f phing/tests.xml test:infection
|
$ docker-compose exec php bash
|
||||||
|
root@18f2f0cfaa5d:/var/www/application# XDEBUG_MODE=coverage phing -f phing/tests.xml test:infection
|
||||||
```
|
```
|
||||||
|
|
||||||
### Result of testing
|
### Result of testing
|
||||||
|
|||||||
@@ -86,4 +86,4 @@ tests.database = ${dir.data.temporary}/database.sqlite
|
|||||||
# - Infection (mutation tests)
|
# - Infection (mutation tests)
|
||||||
#
|
#
|
||||||
tests.phpunit.command = ./vendor/bin/phpunit --verbose
|
tests.phpunit.command = ./vendor/bin/phpunit --verbose
|
||||||
tests.mutation.command = ./vendor/bin/infection --ansi --threads=5 --coverage=build/reports/infection
|
tests.mutation.command = ./vendor/bin/infection --ansi --threads=$(nproc) --coverage=build/reports/infection
|
||||||
|
|||||||
Reference in New Issue
Block a user