Примерен код

0
0

Log if validation fails
Since REST Assured 2.3.1 you can log the
request or response only if the validation fails.
To log the request do:

given().log().ifValidationFails(). ..
To log the response do:

.. .then().log().ifValidationFails(). ..
It's also possible to enable this for both
the request and the response at the same time using the LogConfig:

given().config(RestAssured.config().
logConfig(logConfig().enableLoggingO
fRequestAndResponseIfValidationFails(HEADERS))). ..
This will log only the headers if validation fails.

There's also a shortcut for enabling logging
of the request and response for all requests if validation fails:

RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();

Подобни страници

Подобни страници с примери

На други езици

Тази страница на други езици

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Íslensk
..................................................................................................................

Популярно в тази категория

Популярните страници с примери в категория