忽略 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);
}