Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pilati's avatar

Laravel test coverage not showing any results

Hello, i have created a Laravel 9 app, and recently i upgraded to Laravel 10. When i run php artisan test --coverage only tests results are displayed. Coverage param is ignored

php -v:

PHP 8.1.16 (cli) (built: Mar  1 2023 12:35:15) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.16, Copyright (c) Zend Technologies
    with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

xdebug.ini:

zend_extension=xdebug

[xdebug]
xdebug.mode=develop,debug,coverage,profile
xdebug.start_with_request=yes
error_reporting=E_ALL
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.log_level=0

php artisan test --coverage:

   PASS  Tests\Feature\Admin\Equipamentos\CategoriaTest
[...]
  ✓ test case 1  0.38s

  Tests:    61 passed (232 assertions)
  Duration: 40.48s

Any ideia to solve that problem?

0 likes
2 replies
VolhaR's avatar

I had the same problem. Try to create folder reports and run php artisan test --coverage reports/

2 likes

Please or to participate in this conversation.