I'm a beginner with Eclipse and PHPUnit. I think I configured my PHP project correctly to run PHPUnit with code coverage. My problem is : when I run PHPUnit from Eclipse, the tests are executed normally, the html report is generated, but all coverage lines and functions have the value "0%" :

If I run PHPUnit in the terminal with the command vendor/bin/phpunit (it uses the same phpunit.xml than in Eclipse) the html content is correct :

I don't understand why the coverage is empty if I start PHPUnit from Eclipse. Do you have an idea for me ?
Thanks for your help !
Softwares versions I use :
- Eclipse 2023-12 (4.30.0)
- PHP 8.1.2
- PHPUnit 9.6 (installed with Composer)
Код: Выделить всё
tests/unit
src

In Eclipse, I started the debugger to get the phpunit command line parameters and start the program with the same parameters in the terminal :
Код: Выделить всё
path/of/phpunit --include-path /tmp/phpunit_printer --printer PHPUnitLogger --configuration /path/of/my/project/phpunit.xml /path/of/my/project/tests/unit
Источник: https://stackoverflow.com/questions/781 ... e-coverage
Мобильная версия