-
|
I am using sail with settings.json for phpunit like this (as exactly stated on documentation) and then i try to run test with coverage. i got the output like this and it said success for generating clover file but the coverage UI result not showing. I am afraid i miss config or certain step. could you @recca0120 guide me or point me to the reference which i can try to implement |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This issue has been fixed in recent versions. Root cause: The extension previously wrote the coverage clover XML file to Fix: In PR #370, the clover file path was changed from Please update to the latest version and try again. Your existing configuration should work as-is: {
"phpunit.command": "docker compose exec -u sail laravel.test ${php} ${phpargs} ${phpunit} ${phpunitargs}",
"phpunit.phpunit": "artisan test",
"phpunit.paths": {
"${workspaceFolder}": "/var/www/html"
}
} |
Beta Was this translation helpful? Give feedback.

This issue has been fixed in recent versions.
Root cause: The extension previously wrote the coverage clover XML file to
/tmp/inside the Docker container. Since/tmpis not part of the volume mount, the host (VS Code) could not read the generated clover file, so coverage results never appeared in the UI.Fix: In PR #370, the clover file path was changed from
/tmpto${workspaceFolder}/.phpunit.cache/. Because Laravel Sail mounts${workspaceFolder}to/var/www/htmlinside the container, andphpunit.pathsmaps between them, the clover file is now written to a location accessible from both the Docker container and the host.Please update to the latest version and try again. Your existing co…