Step 5: Hello, r u 200 OK?
Configure Rest Assured
protected RequestSpecification requestSpecification;
@LocalServerPort
protected int localServerPort;
@BeforeEach
public void setUpAbstractIntegrationTest() {
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
requestSpecification = new RequestSpecBuilder()
.setPort(localServerPort)
.addHeader(
HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_JSON_VALUE
)
.build();
}Call the endpoint
Last updated