Answer the question
In order to leave comments, you need to log in
Why doesn't code coverage affect all project files?
Project on yii2. I run the tests like this codecept run unit --coverage-html
. As a result, only those files that participated in the tests get into the code coverage. At the same time, most of the files are not covered by tests. The report shows that the coverage is almost perfect
. Here are the coverage settings
coverage:
enabled: true
white_list:
include:
- ../modules/*
- ../controllers/*
- ../commands/*
- ../mail/*
blacklist:
include:
- ../assets/*
- ../config/*
- ../runtime/*
- ../vendor/*
- ../views/*
- ../web/*
- ../tests/*
Answer the question
In order to leave comments, you need to log in
Optionally, all whitelisted files can be added to the code coverage report by setting addUncoveredFilesFromWhitelist="true" in your PHPUnit configuration
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question