1.導入
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
2.代碼示例
assertAll("返回值校驗:",
()->assertEquals("0",response.path("errcode").toString()),
()->assertEquals("created",response.path("errmsg"))
);
注:此方法可實現1個用例中包含多個斷言,遇到斷言失敗仍然會繼續下一個斷言