問題
遇到這樣的異常情況.
The annotation @Test is disallowed for this location
問題代碼:
@Test
public void testCase1{
}
解決措施
腦抽了. 方法沒加()括號. 加上即可.
@Test
public void testCase1(){
}
一般此類異常主要有2個原因:
- 編寫錯誤
- @Test標籤位置錯誤
遇到這樣的異常情況.
The annotation @Test is disallowed for this location
問題代碼:
@Test
public void testCase1{
}
腦抽了. 方法沒加()括號. 加上即可.
@Test
public void testCase1(){
}
一般此類異常主要有2個原因: