Is there a facade for Unit Test Frameworks?
You know, like SLF4J is to开发者_如何转开发 log4j, so X is to TestNG and jUnit?
What about Spring TestContext? According to documentation, it can provide what you are looking for.
I haven't used it in this way yet, so I may be wrong.
The Spring TestContext Framework (located in the org.springframework.test.context package) provides generic, annotation-driven unit and integration testing support that is agnostic of the testing framework in use, whether JUnit 3.8.2, JUnit 4.5+, TestNG 5.10, and so on.
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/testing.html#unit-testing
精彩评论