testng使用總結與遇到的坑

1、 Assert 是testng中的斷言, 如果斷言失敗,會報

Exception in thread "main" java.lang.AssertionError: expected [1.92] but found [1.0]

注意這裏是AssertioError不是Exception . 不能使用try  catch(Exception e)捕獲,需要使用 try catch(Error e)來捕獲

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章