Как продолжить выполнение теста после сбоя по утверждению ⇐ JAVA
-
Anonymous
Как продолжить выполнение теста после сбоя по утверждению
response = res.when().post(a.getGetBankAPI()).then().extract()
.response();
//Thread.sleep(1000);
int statuscode = response.getStatusCode();
System.out.println(statuscode);
try {
Assert.assertEquals(statuscode, 200);
} catch (AssertionError e) {
org.testng.Assert.fail("Actual value is not equal to Expected value for");
}
System.out.println(getJsonPath(response, "error.message[0].msg"));
assertEqual(getJsonPath(response, "error.message[0].msg"), "branch should be 3 to 50 character long", "Error for passing Empty Branch");
< /code>
Здесь I Тестовый пример проходит после того, как код состояния STEP Print LN, но он не упоминал как неудачный, но это было просто пропуск, и полное выполнение теста здесь прервано, если USR PrintStackTrace (), это не было пропуском, но это также не было отмечено как неудача
Подробнее здесь: https://stackoverflow.com/questions/755 ... -assertion
response = res.when().post(a.getGetBankAPI()).then().extract()
.response();
//Thread.sleep(1000);
int statuscode = response.getStatusCode();
System.out.println(statuscode);
try {
Assert.assertEquals(statuscode, 200);
} catch (AssertionError e) {
org.testng.Assert.fail("Actual value is not equal to Expected value for");
}
System.out.println(getJsonPath(response, "error.message[0].msg"));
assertEqual(getJsonPath(response, "error.message[0].msg"), "branch should be 3 to 50 character long", "Error for passing Empty Branch");
< /code>
Здесь I Тестовый пример проходит после того, как код состояния STEP Print LN, но он не упоминал как неудачный, но это было просто пропуск, и полное выполнение теста здесь прервано, если USR PrintStackTrace (), это не было пропуском, но это также не было отмечено как неудача
Подробнее здесь: https://stackoverflow.com/questions/755 ... -assertion