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

Mayaarjunan's avatar

Lumen shows Command "test" is not defined. error when executing php artisan test

Hi, I would like to do testing using phpunit in my lumen project, and the version is 9.1 .When I tried to execute the "php artisan test" command, it shown the error " Command test is not defined" .And in my project PHP unit is already installed and the cofiguration in composer.json is like below "phpunit/phpunit": "^9.5.10" How can I use php artisan test in lumen?

0 likes
1 reply
Mayaarjunan's avatar
Mayaarjunan
OP
Best Answer
Level 1

Hi, Got the solution vendor/bin/phpunit

Please or to participate in this conversation.