Running the current edited test

What is the simplest way to run a junit test that I'm in the process of writing/editing.

Do I really have to shift-f9 and click on the Add Test button and name it and write in (or select) the class name, (after selecting the module) and Then run it?

This seems a bit cumbersome. I'm going to end up with an entry for every single test this way, as I always want to run it as I'm writing it (sorry Tests First evangelists!) to see how it's doing, but once it's written I only ever need to run it as part of the package.

Isn't there a simple key stroke that will run my current class (test or otherwise) in it's module, with no special parameters.

Even better would be a plug-in that would enable this feature AND give the option to set up default system properties to send into the test/class.

Is this currently available or should I beg on the plugins page...

5 comments

Right click on the test and select Run "methodName()". I have this action (Other > Run context configuration) mapped to CtrlAltF10 but that probably isn't default.

Bas

0


Ctrl-Shift-F10 will do exactly what you want, or there is an entry in the editor's right-click menu when you have a selection somewhere in a test method. Yes, this feature is really handy. Unfortunately, this keymapping doesn't seem to be re-mappable, and there is no similar keymapping for "debug the currently selected test" (although that's in the right-click menu as well).

--Dave Griffith

0

You can remap both the run and debug actions in the editors right-click menu.
Look for
Other > Run context configuration
and
Other > Debug context configuration
in the keymap settings dialog.

Bas

0


Thanks. I hadn't connected that somewhat cryptic command name to the commands. I'm gonna love having Ctrl-Shift-F11 as "Debug current test method".

--Dave Griffith

0

thanks guys! That's just what I needed.

alan

0

Please sign in to leave a comment.