Description
Having something like this, that works out-of-the-box without developers need to do all the Jiu Jitsu for the integration would come handy — even more for testing micro-services.
I'm thinking about integrating something like Pact JVM
with abilities to test (a) contracts for REST or HTTP as a means of communication, (b) message brokers (like the output from a method or a message), (c) you name it.
One can achieve something similar by using JsonSchemaValidator.matchesJsonSchemaInClasspath
, but that wouldn't be a "clear way" to define the contracts:
RestAssured.given()
.when()
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON)
.get(Constant.Uri.Comments)
.then()
.body("$.size()", Matchers.greaterThanOrEqualTo(4))
.body(JsonSchemaValidator.matchesJsonSchemaInClasspath("schema/json/comments__get-all.json"))
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.statusCode(HttpStatus.SC_OK);
Has there been any work done to support contract testing in Quarkus?
Most helpful comment
Has there been any work done to support contract testing in Quarkus?