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)來捕獲
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)來捕獲
1、在pom.xml中引入3個依賴 <dependencies> <dependency> <groupId>com.relevantcodes</groupId>