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

samdevries's avatar

Codecept wont run tests

Hi Guys,

For some reason my codecept wont run my functional tests anymore. It did work yesterday, but today I only get the following message when I run "vendor/bin/codecept run functional":

Codeception PHP Testing Framework v2.0.5
Powered by PHPUnit 4.2.4 by Sebastian Bergmann.

I run it inside a Vagrant Homestead Box that I installed on my windows pc.

Anyone have any ideas?

0 likes
8 replies
Devon's avatar

Try running a single test by appending the file name (including extension) to the run functional command.

samdevries's avatar

Hi Devon,

Thanks for the reply. I tried running a specifiec file/cept, but got the same result. I also tried running one that I know would fail to test that. Same story.

Any ideas how I could troubleshoot further?

Devon's avatar

Sounds like a typo or a config error...

Have you changed anything since they last worked?
Try running vendor/bin/codecept build...

samdevries's avatar

Hi Devon,

I tried running vendor/bin/codecept build but that was not the solution.

Your question if I changed anything since the tests last worked somehow reminded me to test with Git. I dont know why I did not look at that before.

After checking out some older commits I found the problem. When I use the following code, it breaks....

use Laracasts\TestDummy\Factory as TestDummy;
/* ------------------------------------------------------------------------ */

TestDummy::create($model, $overrides);

Do you by any chance know what that is about? To clarify, I do know what the function does, but dont know why it breaks my tests.

Thanks for the help so far!

Devon's avatar

Please post all code relevant to that snippet... That alone does not provide enough to go on.

samdevries's avatar
samdevries
OP
Best Answer
Level 4

Hi Devon,

I found out what the problem was. There was a typo somewhere... Might be time for me to stop working and go get some sleep.

Thanks for the help mate!

samdevries's avatar

Hi @unicodeveloper,

I suggest commenting all your test code and try to see if it works again.

Then go back and uncomment file by file. You might find the problem that way. Within the problem file you can even uncomment line by line to narrow down.

Hope this helps.

Please or to participate in this conversation.