我有一个使用旧 Junit 3 方式的遗留测试类:public class MyTestUtil extends TestCase { //class has helper methods but no method starting with "test"}我有其他扩展这个类的测试类:public class MyTests extends MyTestUtil { public void testSomething() { }}我正在尝试使用 gradle 构建文件来运行它。并且构建失败并抱怨警告:junit.framework.AssertionFailedError: No tests found in myPackage.MyTestUtil当我从测试任务中排除此类时,构建显然运行良好:test { exclude '**/MyTestUtil.class' }但我不知道这样排除是否是唯一的解决方案。有没有办法消除这个警告?
添加回答
举报
0/150
提交
取消