-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pact consumer-driven contract testing extension #27729
Pact consumer-driven contract testing extension #27729
Comments
/cc @evanchooly, @geoand |
I've got a prototype extension written which fixes the classloading issues, before anyone rushes off to try and fix. :) |
It would be hosted in the Quarkiverse, right? |
That's my intention. |
This should also have the "area/testing" label. |
See also #6276, which is arguably a duplicate of this but which I missed in my searches (and this one has the extension-proposal issue type). |
It might also be possible to address #22611 with an extension but that would need a lot of thought. |
Could you do the repository-making, @gastaldi? :) Unless there are any objections? |
@holly-cummins only if you don't mind waiting for me to return from my PTO on October😛 Could you create a PR in the quarkiverse-devops repo according to https://github.com/quarkiverse/quarkiverse-devops#workflow-for-new-repositories? Here is an example: quarkiverse/quarkiverse-devops#91 |
https://github.com/quarkiverse/quarkus-pact/ is the new home of the extension. |
Description
Pact is a widely-recommended framework for consumer-driven contract testing. Because Quarkus is optimised for microservices and consumer-driven contract tests are an important part of a microservices development workflow, Pact is particularly relevant for Quarkus.
Why is an extension needed? Functional issues
Although it is possible to use Pact with Quarkus (see https://github.com/skattela/pact-workshop-jvm-quarkus and https://github.com/holly-cummins/house-of-microservices-quarkus-contract-testing-sample), Pact tests do not work in continuous testing mode.
quarkus-kotlin
extension.Usability enhancements
Although fixing the functional issues is most important, there are also a range of enhancements that could improve the Pact user experience:
@BeforeEach
acontext.setTarget(new HttpTestTarget("localhost", 8081))
on every testInterested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).
Configuration suggestion
Additional context
This has been requested up occasionally in the broader community.
There was a long discussion on the google groups a year ago.
See also, for example, https://lightrun.com/answers/quarkusio-quarkus-consumer-driven-contracts-integrationsupport: "CDC is a big part of our Spring Boot microservice qa process, and it would be very desirable to have an equivalent in quarkus."
Note also that Pact is not the only contract testing option; Spring has Spring contract, although it is not as polyglot as Pact. It is also possible to use tools such as Schemathesis, Prism, and OpenAPI in combination (see a tutorial here).
The text was updated successfully, but these errors were encountered: