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

Steve Loughran commented on HADOOP-4901:
----------------------------------------

I've played with both of these. In some ways I prefer testng to junit4. Junit4 
is a better drop-in for the ant tasks, though reporting through <junit> is a 
bit degraded. Someone -and it would probalby end up being me- would have to 
improve things there by having a separate antlib for junit4 that is java5+ only.

TestNG has a very complex interdependency system, all configured from XML. Its 
powerful, but can get a bit confusing, and some people are against it because 
its ordering stops tests being independent. I think that's a unit test purist 
opinion. What they do have is some data-driven testing where a CSV file drives 
the same method with different parameters; this could be interesting.

Both of them treat functional testing of a system cluster as a bit of an 
afterthought, as do the standard XML->HTML reports. I've done lots of work in 
testing smartforg by using it as a functional test runner itself: deploying 
tests and collecting the results. That is also something hadoop's functional 
tests could do, feeding the results back into the DFS for later analysis. 

> 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