0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravel 8.x 「No tests executed!」解決方法

Posted at

LaravelでphpUnitを実行しようとしたところ「No tests executed!」のエラーが発生した。
公式ドキュメントのartisanコマンドを使用する方法も試したが、同様のエラーが発生。

実行コマンド
vendor/bin/phpunit
php artisan test
実行結果
artisanの場合
No tests executed! 

原因

vondor/bin/phpunit --helpで確認したところ、テスト対象のファイルまたはディレクトリの引数が必須とのこと。
引数が不足していたので、エラーが発生した。

解決方法

対象のディレクトリを引数に渡せばOK

実行コマンド
vendor/bin/phpunit tests
artisanの場合
php artisan test tests
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?