Reputation: 19903
I have a JUnit run configuration to run all my unit tests.
How can I bind a keyboard shortcut to the run of that JUnit config?
Upvotes: 65
Views: 26197
Reputation: 401975
There is now a third-party plug-in:
Workarounds without plug-ins:
Use Run | Run... (Alt+Shift+F10) on Windows to quickly select the configuration to Run or Debug
Run the tests from the Ant script target, IDEA allows to assign keyboard shortcuts for the selected targets in Settings | Keymap.
Upvotes: 81
Reputation: 2479
I've created plugin for this Run Configuration as Action.
After loading of this plugin it register all Run/Debug configurations as actions. So you can assign shortcut for them, add them to toolbars, etc.
It works for all Jetbrains IDEs based on IntelliJ platform: CLion, PyCharm, PhpStorm, etc.
Upvotes: 17
Reputation: 1789
(After installing the plugin from the Plugin Manager, enable the Infinitest facet for your project. Right click on the project, choose facet, add Infinitest.)
It's a bit workaround-y but it works for me. I like that I don't have to engage with any dialogues.
Upvotes: 0
Reputation: 4300
You can also create a Macro and assign a shortcut to that Macro as a workaround.
Upvotes: 24