Open x80486 opened 4 years ago
Has there been any work done to support contract testing in Quarkus?
Same question here :)
It's a shame that a framework, which is meant for microservice orchestration, has only testing support for monolithic applications. We need orchestration support like provided by spring-cloud-contracts or pact.
I would agree with @ambition-consulting - CDC is a big part of our Spring Boot microservice qa process, and it would be very desirable to have an equivalent in quarkus. Ideally the framework should be language-agnostic so that e.g. contracts published by a Quarkus microservice producer can be tested by a Nodejs consumer - spring-cloud-contracts AFAIK does not support that.
Apparently Pact tests can at least get executed again with Quarkus 2: https://github.com/skattela/pact-workshop-jvm-quarkus
See #27729, which is arguably a duplicate of this, but with the extension-proposal type.
See also #9677 which sets many pact artifacts to be parentfirst in a core pom, with a comment
<!-- Pact[<4.1.0] support. It would be great if there was somewhere better to put this-->
Those updates should perhaps? move to this extension once implemented.
See https://github.com/quarkiverse/quarkus-pact/, and also https://www.youtube.com/watch?v=d9CSY8HuZ9U, which discusses some of the roadmap for CDC support in Quarkus.
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: