Run junit tests on class and/or method

Can I run junit tests on just a class of tests, and not the whole package? When I right click the class, there is no option available to run the tests - this run option only appears at the package level (when right clicking on the package explorer).

Im not looking to be able to run individual tests (like Eclipse can do), but being able to run junit tests on a specific test class, and not the entire package would be very helpful.

N

2 comments
Comment actions Permalink

As long as IDEA recognizes a class as a test, you can right-click on it in either the project panel, the editor, or the editor tab, and be offered menu options to run or debug the test. (Note, however, that if you right-click in a test method , the actions will only run or debug that method. This is both powerful and occasionally annoying.)

Is this not what you're seeing? Does the class have the little test icon in the project panel?

--Dave Griffith

0
Comment actions Permalink

I was not seeing that behavior on my test classes, hence my post - Ive not been using IDEA for a while and I didnt know if this functionality was available. Ill dig around some more with simpler projects (the latest EAP is not coping with the current project that I'm working on so there are other issues there), but Ill look again at the junit functionality.

Thanks Dave!

Nick

0

Please sign in to leave a comment.