[ 
https://issues.apache.org/jira/browse/HADOOP-4901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657717#action_12657717
 ] 

Tom White commented on HADOOP-4901:
-----------------------------------

Categories would be nice to have. The documentation for JUnit 4.4 at 
http://junit.sourceforge.net/doc/ReleaseNotes4.4.html mentions categories, and 
says

bq. This feature will very likely be improved before the final release of JUnit 
4.5

However I can't find a Category annotation in 4.5, so perhaps it hasn't been 
added yet. There is a JUnit Extension project at 
http://junitext.sourceforge.net/ (Apache-licensed) which does define a Category 
annotation for this purpose. (I haven't tried it.)

Here is a comparison of TestNG and JUnit 4: 
http://xplanner.codehaus.org/Migration+to+JUnit4+or+TestNG. TestNG requires 
source migration of tests, whereas JUnit 4 is just a change of jar. 

BTW I wrote a blog entry with some other ideas for improving testing at 
http://www.cloudera.com/blog/2008/12/16/testing-hadoop/

> Upgrade to JUnit 4
> ------------------
>
>                 Key: HADOOP-4901
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4901
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: test
>            Reporter: Tom White
>            Assignee: Tom White
>
> Amongst other things, JUnit 4 has better support for class-wide set up and 
> tear down (via @BeforeClass and @AfterClass annotations), and more flexible 
> assertions (http://junit.sourceforge.net/doc/ReleaseNotes4.4.html). It would 
> be nice to be able to take advantage of these features in tests we write.
> JUnit 4 can run tests written for JUnit 3.8.1 without any changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to