Hello, I've been using PACT for HTTP contracts, a...
# general
m
Hello, I've been using PACT for HTTP contracts, and it's great. I have some questions regarding its usage with message contracts: - I've noticed that the documentation does not provide a full scenario example of how to write and validate a contract for message target as it does for HTTP ones, does this have any implication on the future development targeted for the message contracts, or is it just not mature enough? - When verifying HTTP contracts, PACT tests the contracts against the controller at the exposed port by the provider. However, for the message contracts, it is as simple as manually building the message object and returning it in a method, which does not really tests the correctness of the provider, since it can be returning a different object than the one being used in reality. Are there any future plans or vision to change this?
👋 1
y
we have a few examples in different languages, which are you looking for? you are correct that message pact is agnostic of the protocol and concentrates on on the message handling, probably of a message processor in your code, if it’s suitably split from the transport layer. we are aware that this is a halfway house and have since introduced the pact plug-in framework to allow for users to construct their own plugins to handle custom matching rules say for different content types, or protocols/transport layers, pact protobuf plug-in being the first allowing for contract testing of proto/grpc messages.
m
Thanks for the reply! I am using pact with Spring framework in java. Yes, I came across some examples, but finding an example with the same consumer/provider dependencies was quite a hassle, but I figured it out in the end. Thanks for letting me know about the plugin-in framework. I was intending to give it a look anyway. I hope it suits my use case.