Better PHPUnit VS Code Extension

Developer Tools

November 2nd, 2020

Better PHPUnit VS Code Extension

Better PHPUnit is a Visual Studio Code plugin by Caleb Porzio for running PHPUnit tests from the editor. Like Sublime PHPUnit, it automates running repetitive PHPUnit commands using the command palette or keyboard shortcuts.

The main features of Better PHPUnit include:

  • Run a test method
  • Run a test file
  • Run the entire suite
  • Run a previous test

If you can imagine your workflow of working through a failing test, you can continue to run the previous test to see the results as you change code without leaving your editor.

If you’ve used PhpStorm, you already know the power of running tests from within the IDE and not losing the window’s context by switching to the terminal. This plugin will surely improve your testing workflow on PHP projects.

You can install this plugin from within VS Code by searching the extension marketplace for “Better PHPUnit.”

You can learn more about this extension from the Visual Studio Marketplace, and see the source code on GitHub at calebporzio/better-phpunit.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.