-
1. Re: JUnit 4?
clebert.suconic Oct 26, 2009 1:21 PM (in response to jamescarr)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) -
2. Re: JUnit 4?
ataylor Oct 26, 2009 1:42 PM (in response to jamescarr)Why don't you raise a JIRA and mark it against 2.1. We (you ;)) can do it then :)
-
3. Re: JUnit 4?
clebert.suconic Oct 26, 2009 6:26 PM (in response to jamescarr)@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 :-)
http://www.google.com/search?q=Test+anti+pattern
http://blog.james-carr.org/2006/11/03/tdd-anti-patterns/
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 ;-)
Thanks -
4. Re: JUnit 4?
timfox Oct 27, 2009 1:53 PM (in response to jamescarr)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... -
5. Re: JUnit 4?
jamescarr Oct 27, 2009 7:37 PM (in response to jamescarr)Hi Clebert,
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. ;)