报告 junit.framework.TestCase 继承者中的 JUnit 4 @Test 批注方法。 混合 JUnit 的 API 会导致运行测试出现问题。

示例:


  public class MyTest extends TestCase {
      @Test //名称不是以“test”开头,因此将被忽略
      public void wouldBeIgnored() {}
  
      @Test   //名称以“test”开头
      @Ignore //因此即便有 @Ignore 注解也会执行
      public void testWouldBeExecuted() {}
  }

提供的修复: