Created by: dcposch
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 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 :)