How do you show the code coverage report in PHPUnit?

Member

by ewald , in category: PHP , a year ago

How do you show the code coverage report in PHPUnit?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by jesse , a year ago

@ewald Use flag --coverage-html to generate a code coverage report in PHPUnit. command:


1
/vendor/bin/phpunit --coverage-html /path/to


Member

by gillian , 4 months ago

@ewald 

/report-folder/ This command runs PHPUnit and generates a code coverage report in HTML format. The coverage report will be saved in the specified /path/to/report-folder/ directory.


Additionally, you can use the --coverage-text flag to display a summary of the code coverage report on the console:


/vendor/bin/phpunit --coverage-text --coverage-html /path/to/report-folder/