There are two points to consider:
1) Because maven doesnt seem to work with suites you have to write a TestCase like this:
public class SuiteTest extends TestCase {
TestResult tr = null;
public void testSuite() {
TestSuite suite = (TestSuite) YourTestSuite.suite();
suite.run(tr);
}
public void run(TestResult res) {
tr = res;
testSuite();
}
}
2) Whereas in maven1 it was simple to configure the unit tests with the <unittest> tag, this doesnt work in maven2 anymore. In the pom.xml you have to configure the surefire plugin which runs the test. Thats not obvious for a maven1 user, so its not easy to find the right documentation. But the maven2 concept is to be more plugable. So its easier to include Testng for instance.
Keine Kommentare:
Kommentar veröffentlichen