logo
  • 教程列表
  • SO官方文檔
  • 忽略 Junit 中的測試用例
    • 忽略 Junit 中的測試用例
  1. StackOverflow 文件
  2. junit 教程
  3. 忽略 Junit 中的測試用例
  4. 忽略 Junit 中的測試用例

忽略 Junit 中的測試用例

Created: November-22, 2018

  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);
}
  • 忽略 Junit 中的測試用例

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明