I guess we just didn't upgrade it because we were focusing on other things.
Maybe we should do it after GA. I'm just afraid about side effect problems and having to spend time debugging tests that stopped working because of semantic changes on JUnit. I'm not sure if 100% sure we could guarantee the same semantics between JUnit 3 and 4. (setUp, tearDown, suite.. etc)
Why don't you raise a JIRA and mark it against 2.1. We (you ;)) can do it then :)
@Jamescarr... Not that I was intentionally googling you. (I actually also saw a few of your messages on twitter about testing.. that's why I was googling some of the stuff you did post on twitter).
You seem to blog a lot about Testing:
If someone google for "Test Anti Pattern" you will have your blog post as the first one in line :-)
In particular I saw you blogging a lot about Mocking frameworks a la EasyMock. Something you called Mockito.
So, besides Junit4, what other upgrades you would make to our testsuite?
We used to use EasyMock, but it wasn't a good experience.
Also.. what about TestNG? Do you have any experience with it? It seems the same as JUnit to me, and since all the IDEs have plugins for it we never thought about any other options...
Anyway.. I just wanted to use this opportunity to hear your ideas ;-)
I agree with Clebert.
It would be nice to upgrade to Junit 4, but I don't think it is a priority right now for the GA release, since Junit 3 works.
We could certainly look at this after 2.0 if someone adds a JIRA...
I've used mocking frameworks for about 4 years... after using JMock, RMock, and EasyMock, I decided they they were all more hassle than they were worth and ditched them for hard coded Mock implementations of interfaces.
Mockito is the one framework that finally made me leave the world of hard coded mocks again as it's simple and elegant... and has none of that replay nonsense. I could pick a test from the code base and rework it with Mockito and post the resulting test here if there's interest. ;)
As for TestNG... I've tried it, but never found it interesting/useful enough to switch from JUnit4. :)
As for breaking JUnit3 tests, in my experience JUnit3 tests run just fine with the JUnit4 runner... the TestCase class is the same as it is in JUnit3, Junit4 tests just use annotations instead of extending TestCase.
I'll put a JIRA issue in for it. ;)