Update documentation for Infection (Mutation Testing) and use the "nproc" command that returns the number of processors available

This commit is contained in:
Meritoo
2022-02-12 13:33:30 +01:00
parent 31a7ca6d1a
commit a3af138f0c
2 changed files with 6 additions and 4 deletions

View File

@@ -105,20 +105,22 @@ docker-compose exec php phing -f phing/tests.xml test:phpunit
docker-compose run --rm phpunit --verbose --no-coverage
```
# Mutation Tests
# Infection - Mutation Testing
Served by [InfectionMutation Testing Framework](https://infection.github.io).
### Running tests
```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
```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