On Sat, May 01, 2010 at 01:14:01PM -0500, Spencer Jackson wrote:
> I was poking around, and noticed that we're using JUnit3. According to the
> Coding Standards on the wiki, this is because we'd need to rewrite our
> tests. However, JUnit4 is backwards compatible with older tests, meaning
> upgrading wouldn't actually be that painful. I added a new test using the
> JUnit4 API, changed build.xml to use my system's junit4.jar, ran ant, and
> everything worked. So, do we want to upgrade?
> 
> Advantages:
> * Test classes no longer need to extent TestCase
> * More flexibility in naming test methods, and setUp and tearDown methods
> * Better exception handling
> * Able to ignore tests known to fail
> * Classwide fixtures, for resources that either only need to be created
> once, or are really expensive to create
> * Able to fail tests if they take too long to run
> * Parametrized tests, which run a test repeatedly for different values
> * Probably more things which I am currently unaware of
> 
> So, thoughts?
> Spencer

Hi,

Back when we took the decision to go for junit3 we aimed at having a strict 
java1.4 code-compliance. If I remember correctly, junit4 requires java1.5+ and 
that's why we started with junit3.

I have no objection to moving to junit4 provided it doesn't require too much 
work.

Florent

Reply via email to