忽略 Junit 中的測試用例
- 轉到要忽略的測試方法
- 在
@Test註釋之前,輸入@Ignore - 可選:你可以新增說明為什麼忽略此測試方法,例如:
@Ignore ("ignoring this test case for now")
一個示例方法是:
@Ignore ("not going to test this method now")
@Test
public void test() {
assertfalse(true);
}
@Test 註釋之前,輸入 @Ignore@Ignore ("ignoring this test case for now")一個示例方法是:
@Ignore ("not going to test this method now")
@Test
public void test() {
assertfalse(true);
}