In JUnit launch configurations, you can now edit the test method:
When the test method is empty, all tests in the class will be run.The particular thing about this feature is that it was already possible to have a single method under test, but it was only available in an arcane way, through a launch shortcut. Select an individual method in the Eclipse editor (I imagine it's also possibly available through an outline or other such adapted view), right-click and select Run As > JUnit Test.
My hope isn't that a small feature like this makes Eclipse more powerful, but that it makes you more powerful. Give it a try and provide feedback on the bug report.
Powerful features lose their worth if people don't know about them, and people won't find out about powerful features if they're hard to find. Word-of-mouth only goes so far.
Whether or not you believe Eclipse users suffer death from a thousand paper cuts (I do like that matrix), every tool has its rough edges. What small usability feature do you think would make a difference?
6 comments:
Excellent new feature. My next favorite papercut is: https://bugs.eclipse.org/bugs/show_bug.cgi?id=272076
How about this "paper cut." This hits me when developing Junits. Often times one one test out of the whole suite is giving me problems. So I right click on just re-debug that single test. I can repeatedly relaunch this single test over and over from the Junit view. However, if I just click the debug toolbar it will run the whole suite (just the single test). This is a little annoying as I have to remember to launch from the view instead of the toolbar.
One more thing. Test selector in JUnit launch configuration uses different dialog than Type selection (Ctrl+Shift+T), and camelcase can not be used, I always have to write full class name. :-(
Yeah, these all sound like reasonable little things worth fixing.
Thanks for contributing this Robert! It's funny because I found myself using it this morning, but didn't actually realize it was new. I just had a vague memory of having trouble doing this in the past, and thought I must have somehow missed the ability to change the test method. Your little contribution is already making a difference...
John, that's cool beans. Thanks for saying so.
Post a Comment