![[Java Web学习]junit.framework.AssertionFailedError: No tests found in {Class} [Java Web学习]junit.framework.AssertionFailedError: No tests found in {Class}](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
No tests found in com.XXXXX.XXX.inboundPrepService.bizLogic.prepDeterminationEngine.workers.DeterminePrepOwnerWorkerTest
junit.framework.AssertionFailedError: No tests found in
com.XXXXX.XXX.inboundPrepService.bizLogic.prepDeterminationEngine.workers.DeterminePrepOwnerWorkerTest
这个问题是因为测试类继承了TestCase,而使用了JUnit3的feature导致注解@Test不生效。
解决方案:在test方法名中添加前缀“test”,使用JUnit3的feature;或者不再继承JUnit3的父类。