'No output/nothing happens when running Laravel Dusk

I'm using Laravel's Dusk for browser testing.

Sporadically, when I run php artisan dusk nothing happens. No errors, no output, nothing.

To demonstrate the "nothingness", here's a short video clip.

Same nothingness occurs when running php artisan dusk -vvv.

I am able to run individual tests by specifying the file name, e.g. php artisan dusk /path/to/site/tests/Browser/PagesTest.php

I've run each of my individual tests this way - thinking maybe one was short-circuiting it - but they all run fine when invoked individually.

Sometimes this will happen, I'll troubleshoot for a while, give up, then come back to it days later and it will just work fine.

Update w/ additional info:

  • It's specific to one project; does not happen on a fresh Laravel install

Specs:

  • Laravel 5.7.9 / Dusk 4.0.2
  • Mac High Sierra 10.13.5
  • MAMP Pro 5.1.1 w/ PHP 7.2.8


Solution 1:[1]

To ensure

php artisan dusk

Works well, you need to check the followings :

  • Have chrome installed on your equipement
  • Have the latest update on chrome
  • If you get stuck at 100% after changing at least one of the previous point, you need to change the configuration file for dusk to purge his cache, so go to /phpunit.dusk.xml and add a few lines

For example, add these into the tags :

<php>
    <ini name="display_errors" value="On" />
    <ini name="display_startup_errors" value="On" />
</php>

Then relaunch

php artisan dusk

It should do the trick.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Clément DELORD