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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20100501/b4780165/attachment.html>

Reply via email to