# PhpStorm Testing Workflow
In order to reduce the friction to the minimum so that I can get on with my work, I streamline as much as possible every workflow I end-up repeating several times during the day.
Testing was one of the workflows I used to loathe, with the constant switching to the console or terminal, and having to run custom phpunit commands filtering by the title to get only one single test running.
One of my favorite things to do to improve this workflow is to key bind
Run Context Configuration to ⌘T, so that every time I bring the cursor within the test,
I can run that single test by pressing
Just make sure that PhpUnit (or whatever testing suite you are using) is configured within PhpStorm first.
This is achieved by simply key-binding
Run Context Configuration in PhpStorm.
Open PhpStorm's Preferences
⌘, and start typing
keymap in the search (1),
then search for
run context configuration within the keymaps (2),
and bind whatever key combination you prefer to it.
I have also a very similar workflow in VS Code, but you need a plugin for it.
PRO TIP 😎
I bind also
⌘ + Shift + T to re-run the last run test, so that when you are outside the test class,
doing the modifications in the target class to make the test pass, you can re-run the test from there without needing to going back to the test class.