Autorun PHPUnit Tests in PhpStorm 2017.2
In recent versions of PhpStorm we’ve tried to make improving the testing experience a priority, and in 2017.2 we’ve done just that by introducing the ability to automatically run PHPUnit tests when you stop editing.
The ability to autorun tests has been a hot topic of discussion on Twitter and at conferences and user groups for a long time. There’s been a workaround using file-watchers for a while, but PhpStorm 2017.2 brings you the ability to autorun tests after you’ve stopped editing files integrated into the test runner.
To start your tests automatically running, run your tests, as usual, (using a run configuration – you can find more information in this video), and then turn on auto-testing by using the Toggle auto-test button.
This turns on autorunning of tests 3 seconds after you stop editing any file (excluding scratch files). You can change the time it takes for the autorun to fire using the Set AutoTest Delay menu you can find in the More options (cog) menu.
It’s also worth mentioning that we’ve unified the place you configure your test frameworks, be that PHPUnit, PhpSpec, Behat or Codeception. If you want to create a configuration for a test framework you’ll now find them all under Languages & Frameworks | PHP | Test Frameworks rather than in their own individual settings section. You still create each configuration in the same way as before, however.
We hope you enjoy this new feature, I’m already using this in some of my open source work and it’s really useful – give it a try and let me know what you think.
– Gary & The PhpStorm Team
Subscribe to Blog updates
Thanks, we've got you!
Qodana Clone Finder: Early Access Program
In December 2020, we announced the EAP for Qodana, which is rapidly evolving into a comprehensive platform that allows companies to perform multi-level evaluations of the quality of code they own, contract, or purchase. Qodana helps you detect bugs without relying on an IDE, either on a local machi…
PhpStorm 2020.2 EAP #3
The Early Access Program for PhpStorm 2020.2 is in full swing and today we’ve got the third build of the 2020.2 EAP for you. In this blog post, you can read about improvements for Git installed in WSL2 and Search Everywhere. Download PhpStorm 2020.2 EAP (more…)…
PhpStorm 2019.3.3 Preview
We’ve just rolled out a preview for the third minor update for PhpStorm 2019.3. Please give the PhpStorm 2019.3.3 Preview build 193.6494.5 a try and share your feedback with us. (more…)…
How to Upgrade to PHP 7.4 with PhpStorm
Check out our fresh video with a few nice tips and tricks on how to update your codebase to PHP 7.4. It combines materials from the PhpStorm 2019.2 and PhpStorm 2019.3 releases, with a few cool bonuses to boot. Nikita drew our attention to the fact that setters are slower than assigning prop…