我正在集成一个外部
junit.framework.TestSuite
我的库是使用Maven和JUnit4构建的。典型的测试(如果不是全部的话)都是使用JUnit4注释开始的。如何合并
junit.框架工作.测试套件
进入这个现有的测试代码库?
以下是我迄今为止所做的尝试:
public class JSR330Tck {
@Test
public junit.framework.Test suite(){
Car car = Factories.get(CarFactory.class).buildCar();
return Tck.testsFor(car, false, true);
}
}
或者用静态定义
suite()
方法:
public class JSR330Tck {
public static junit.framework.Test suite(){
Car car = Factories.get(CarFactory.class).buildCar();
return Tck.testsFor(car, false, true);
}
}
这两者都不是通过Maven surefire插件触发的。