忽略 Junit 中的测试用例

  1. 转到要忽略的测试方法
  2. 在 @Test 注释之前,输入 @Ignore
  3. 可选:你可以添加说明为什么忽略此测试方法,例如:@Ignore ("ignoring this test case for now")

一个示例方法是:

@Ignore ("not going to test this method now")
@Test
public void test() {
     assertfalse(true);
}