๐๐ฝ Welcome to the August Pact Blog, where we'll be covering all the updates in the Pact ecosystem along with events & material you've been sharing across the web.
Pact OSS Updatesโ
General Updatesโ
Pact RFC Processโ
We mentioned an RFC process being introduced into the Pact ecosystem, last month, I'm pleased to say the PR has been merged, so I would invite users to begin to raise new RFC's where appropriate as we would love users to participate and help shape the future of Pact you want to see.
Specific language updatesโ
Pact-Referenceโ
Max Campman dropped a PR here to allow non-object matchers for array-contains.
Whilst Ron performed few fixes and incorporated the v2 Pact mock server into the Pact reference libraries
- feat(pact_consumer): Upgrade pact_mock_server to the new 2.0.0 version
- fix(pact_models): ProviderStateGenerator name was not correct
- fix(pact_verifier): Provider state values should be passed to any plugins under a providerState key
- fix(pact_models): Provider state values may be passed in under a "providerState" key
- fix(pact_verifier): Plugin feature was not enabled in the verifier
- fix(plugins): Plugin config needs to have seperate values for HTTP request and response parts
If you are a user of the Pact FFI library, we're hoping to see a new version released very soon with all of the above changes included.
Pact Mock Serverโ
v2.0.1 was released, which defaults the Pact spec version to the version from the Pact if not overridden.
Pact-Reference - Slackโ
Chat with us in: #pact-rust.
Pact-Pluginsโ
v0.5.0 of the pact-protobuf-plugin was released and contains the following features:
Supports injecting provider state values into message fields and gRPC metadata
- An example of usage is provided here
Better use of package names in resolving messages (Thanks to @stan-is-hate for this mammoth effect and offer thanks to Eric Muller who also took time to review.).
Compatibility noteThe plugin is backwards compatible (with a caveat for message provider), but not forwards compatible, therefore it is advised that users update usage to the 0.5.0 or greater
v0.5.1 of the pact-protobuf-plugin was released and fixes handling of google.Structs
correctly as raised in this issue.
An example of usage is provided here
v0.5.2 of the pact-protobuf-plugin was released and fixes fixes HTTP Protobuf interactions can have a message defined for both the request and response parts.
Ron also added some examples in both JVM and Rust, for tests which use HTTP and gRPC transports in the same test. You can find them here
Pact-Plugins - Slackโ
Have you tried out Pact Plugins yet? What's stopping you?
Chat with us in: #pact-plugins.
Pact-Goโ
Pact-Go v2.0.7
has been released which updates libpact_ffi to 0.4.22
& adds Windows CI coverage.
Pact-Go - Slackโ
Chat with us in: #pact-go.
Pact-Pythonโ
Val Kolovos has continued adding features for pact-python, after the blog post announcing async message support in pact-python using the new rust core, he is now working on introducing matchers.
If you want to get involved, don't forget, we have a Pact Compatibility suite which is a set of BDD style tests to check compatibility between Pact implementations. There are full implementations in JVM, and Rust, with Tien over in Pact-PHP using it to guide and validate his Pact Rust core based implementation of Pact-PHP.
Pact-Python - Slackโ
Chat to us in: #pact-python.
Pact-PHPโ
Artur Neumann dropped in a documentation PR, to help users test multiple interactions, in a single test, thanks!
Pact-PHP - Slackโ
Chat to us in: #pact-php.
Pact Rubyโ
Want to see V3 & V4 Pact Specification support in Pact-Ruby?
So do we!
There are two ways we can achieve this.
- Utilise the Pact Rust FFI
- Implement V3 & V4 spec support in Ruby
The latter option is less preferable, as by reusing the Rust FFI across all of our Pact client libraries, we aim to provide a consistent set of functions and experiences for users. However this may present a paradigm change to existing Ruby users, who had the benefit of using the Pact Core built in Ruby natively, whereas other language users relied on the Pact Ruby Gems being distributed in a standalone mechanism.
We are tracking work across three tickets
Please feel free to have the issues and see if you can help!
Chat to us in: #pact-ruby.
Pact-Compatibility-Suiteโ
A Set of BDD style tests to check compatibility between Pact implementations has been created in the pact-compatibility-suite
Current examples
In order to validate pact-go, pact-js & pact-ruby and it's adherence to the pact-specification, it would be good to begin to implement the following tickets.
- Verify Pact-Go against pact-compatibility-suite
- Verify Pact-JS against pact-compatibility-suite
- Verify Pact-Ruby against pact-compatibility-suite
Anyone is welcome to start implementing these, we are beginning to see contributors to pact-pythons v3/v4 implementation, so why not join in?
Community Eventsโ
Are you talking about Pact or contract-testing this year at an event? Why not let us know and get yourself featured!
Mark Bradley - GopherConUK 2024 (Talk)โ
Mark Bradley spoke at GopherConUK 2024 about "Using Pact to deploy Microservice with confidence". Thanks Mark, we will be reaching out to send you some swag!
Augusto Colombelli - Contract Tests โ APIs Guided by Consumers (Blog)โ
Augusto Colombelli dropped in a PR to list his latest blog Contract Tests โ APIs Guided by Consumers, which you can read over on Medium here.
Bas Djistrka - Practical contract testing with Pact (Course)โ
Bas Djistraka from OnTestAutomation has just published details on his newest course, Practical contract testing with Pact. I'll let Bas describe it in his own words.
Contract testing is an approach that addresses the challenges of large-scale integration and E2E testing in distributed systems. It is not a new technique, in fact, it has been around for several years now, but unfortunately there aren't many good introductions, examples and use cases that clearly show the added value of contract testing, and how it can help speed up integration testing.
This course is designed to change that. Through hours of videos, quizzes and hands-on programming exercises, you will learn everything you need to know about contract testing, Pact and the tools in the Pact ecosystem.
You can take a look at the https://ontestautomation.teachable.com/p/practical-contract-testing-with-pact to find out more and sign up.
Bas has kindly provided a discount code PACTFLOW-IO
which will take 15% off the price, it's valid until the end of the year, so what are you waiting for?
Thats a wrapโ
Want to carry on the conversation? Sign up here to join our Slack community, where you will be amongst over 5.8K other users. It's a safe place to ask questions, and a great place to share the awesome work you are doing in the Pact ecosystem.
Whatever you are up to, let us know, and we can look to get you featured in the Pact post.
See you next month folks!
Cheers, Saf