facebook/buck — pull request #189 by dcposch (2014-09-03 02:24:19+00:00)
Title: Add TestNG support

Here's my first cut at adding support for TestNG. For a short intro into what TestNG is and why some teams prefer it over JUnit, see this comparison: http://www.mkyong.com/unittest/junit-4-vs-testng-comparison/

I added a `type` option to `java_test`. Supported values are "junit" and "testng".
The default is "junit", so existing `java_test` rules should work as before.

To avoid duplication, I've extracted a BaseRunner class for shared functionality between JUnitRunner and TestNGRunner.

If this change happens, we might want to rename JUnitStep to UnitTestStep, and so on. That would create a much bigger diff though so to make it easy to see what's going on I haven't done that here.

I've used this on a codebase with a few hundred TestNG tests. It's much faster than Gradle! Hooray! Admittedly that doesn't say much :)

![image](https://cloud.githubusercontent.com/assets/169280/4128754/67a9c77a-3311-11e4-8679-80c64fa4fb9a.png)