| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Spring Web client interceptor integration for Allure Java.
Use this module when your tests use Spring's synchronous HTTP client stack and you want request and response details to appear in Allure Report.
Gradle:
dependencies {
testImplementation(platform("io.qameta.allure:allure-bom:<allure-version>"))
testImplementation("io.qameta.allure:allure-spring-web")
}Maven, with allure-bom imported in dependency management:
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-spring-web</artifactId>
<scope>test</scope>
</dependency>Register io.qameta.allure.springweb.AllureRestTemplate with RestTemplate or another synchronous Spring HTTP client that accepts ClientHttpRequestInterceptor.
RestTemplate restTemplate = new RestTemplate(
new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory())
);
restTemplate.getInterceptors().add(new AllureRestTemplate()
.configureHttpExchange(exchange -> exchange.redactHeader("Authorization")));Configure a buffering request factory when caller code also needs to read the response body after interception.
| Back | FazBrowse Home | New Git URL |