tags:

views:

41

answers:

1

I'm forced to use JUnit 3. If I were using JUnit 4, I would occasionally use @Ignore since several of my tests take a bit of time.

Is there anything analogous in JUnit 4? Commenting out tests is sloppy, and changing the name (from testXxx()) could lead to forgotten tests. @Ignore is great, because it always reminds you which tests were not run.

Does anyone have a best practice for running some of a test classes methods in JUnit 3?

+3  A: 

I don't know any other solution apart from commenting out tests or renaming them. I would go for the renaming option and use my own convention. For example all of them will start with ignoreXXX(). Then you can do one find/replace with your editor and you are ready.

Petar Minchev
Yes. JUnit 3 reflectively looks for methods starting with "test" to execute.
gpampara