Summer Sale! All accounts are 50% off this week.

impbob36's avatar

Dusk via PHPstorm

Does anyone know how to run Dusk through PHPstorm?

Is it possible?

0 likes
7 replies
bobbybouwmann's avatar

Dusk is simply a command line tool. You can setup your PHPStorm with terminal screens and from there simply run

php artisan dusk

You can open the terminal like so

View > Tool Windows > Terminal
impbob36's avatar

Thanks for the update. I currently do exactly what you suggest for running my tests.

However, I also run PHPunit & Karma tests through plugins. These allow me re-run only failed tests via a keyboard shortcut, jump directly to tests within files and filter the display etc.

I guess my (vaguely worded) question was more about a Dusk support / plugin.

edgreenberg's avatar

I use selenium for browser based tests, and the nice thing about it is that I can run the tests from Phpstorm, and even breakpoint through them (at least the PHP aspects of them).

I plan to try out Disk, but it'd be nice if we could run the tests under Phpstorm instead of the command line.

balping's avatar
balping
Best Answer
Level 11

Go to Run -> Edit configurations

Add this

PS

Now if you right click on the Browser folder, you can run dusk tests.

But it won't work if you run the whole tests folder or if you try to run one specific dusk test. So this is a half-solution only.

4 likes
babusharif's avatar

Dusk XML is not available, where can i find it, i am using env.dusk.local file

impbob36's avatar

@balping, thanks for the update. Your setup works great and is a nice addition.

I've been placing with the new Phpstorm EAP release and it seems to support dusk. I can right-click on the class name in a dusk test to run all the tests, or right-click a single test to run that.

Please or to participate in this conversation.