Skip to main content

5 posts tagged with "plugins"

View All Tags

Β· 14 min read

Pact Almanac 2024​

Grab your hoverboard, and get prepared for another trip back to the future, with our round up of this years Pactivities in our seasonal Pact Almanac.

image

This year we've seen the migration to the Pact Rust core, featuring V4 spec good including combined interactions and plugins, begin to take fruition in most of the major client libraries, and improvements and consistencies across of tooling, documentation and examples. We know there is much more to do, as always, and we've been pleased to see an increasing amount of contributions, across a wide array of repositories in the pact-foundation. We've seen an RFC process created, to help democratise large scale decisions which affect the Pact eco-system, and I would invite you all to get involved in some way, shape or form.

If you haven't read our monthly blog posts, you can read a round-up of the most significant changes from each month in there. Check out the side-bar to the left to view the older posts.

I've mainly focused on community heroes this time round, where you can find multiple advocates of Pact, spreading the word of not just how to do contract testing, but the why. You'll hear about the worlds first dedicated book to contract-testing. I hope you'll enjoy them, be sure to like and comment on the videos, whether it's to show your appreciation or you just fancy a debate.

I'll also pull out a stand-out change from each month either by the team or one of our many contributors.

Anyhow, let see what each month has in store for us.

Jan​

πŸ§‘β€πŸ’» Tien Vo started by year by continuing and productionising the migration of Pact-PHP over to the Rust core. We saw the first community created pact_compatibility_suite examples land this month, and Tien has worked diligently all year, in implementing not only new features to Pact-PHP, but contributions to the Pact ecosystem as a whole, from an RFC for form-urlencoded matching ability, to several changes in the Pact-Rust core and Pact-Plugin ecosystem. It has seen great feedback from users, including Steve Taylor.

Not an issue as such, just want to say I love it. (I'm using 10-alpha3)

It's so much faster and simpler, and I'm looking forward to using some of the newer Pact specification features.

My API tests came across easily without much fuss.

Pact-PHP v10, was made generally available in September, in this release.

Well done Tien! Your hard work has paid off and is very much appreciated by the community.

Feb​

  • πŸ§‘β€πŸ’» February saw more libraries progress towards the Rust core and Pact V4 Spec goodness.
  • πŸ§‘β€πŸ’» A plan was set out to provide better platform support for Linux, in terms of distro compatibility, musl and arm64.

Community hero of the month: Stanislav Vodetskyi for all the improvements in the Pact-Go project, and learning Rust on the fly to aid himself and the Pact community by proxy.

Mar​

  • πŸ§‘β€πŸ’» Multi-arch images were finally produced for Docker, enabling arm64 users on Linux, or most likely with new Apple silicon based Macs

Community hero of the month: Dany Marques for his tenacity in tracking down an obscure bug in the npm ecosystem, and creating upstream fixes, as well as resolving his issue in the interim in the pact-js project.

Apr​

  • πŸ§‘β€πŸ’» Josh Ellis was thrilled to announce the release of Pact Python v2.2, a significant milestone that not only improves upon the existing features but also offers an exclusive preview into the future of contract testing with Python. He posted about it over at pact-pythons new doc site, in its inaugural blog post from maintainer Josh Ellis.

We've often wondered when a book dedicated to contract testing would appear on the scene. We even had this statement on the books section of our site

We're not aware of any books currently dedicated to contract testing, but here are some that talk about Pact and contract testing as part of a broader microservices development and testing strategy

However good news everybody 🎺 the first one was announced back in April.

contract testing in action

Community hero(es) of the month: Marie Cruz and Lewis Prescott, for being awesome but also releasing Contract Testing in Action πŸ“• under the MEAP (Manning Early Access Program), the first book dedicated to contract testing.

May​

  • πŸ§‘β€πŸ’» Alpine was finally supported for CLI's and the FFI shared library, and alongside it, changes were made to reduce the size of the Pact libraries, so whilst I began to add Alpine support into the client libraries, existing users got the benefits of quicker downloads. You can read about it here
  • πŸ§‘β€πŸ’» Ron started a redesign/rewrite for a V2 version of the Pact Reference Mock Server

Community hero of the month: Praveen Erode Mohanasundaram - A Long time Pact advocate and community contributor who spoke at Devoxx UK about Contract Testing: The Key to Unlocking E2E Testing Bottlenecks in CI/CD pipeline, you can catch the video on YouTube πŸ“Ί

June​

  • πŸ§‘β€πŸ’» The Pact reference project saw the closure of a couple of long-standing issues which affected cross-platform compatibility and repeated test runs, these unblocked the Pact-Net V5 released, and drove additional changes in Pact-JS. Read more here
  • πŸ§‘β€πŸ’» Pact-JS saw the splitting of the ruby cli, from the main package, and the birth of the new @pact-foundation/pact-cli package. This meant we could deliver native Alpine support to the Pact JS project, including the shared libraries in the project, and due to the package size reductions, the resultant package which contained a pre-built binary for every supported platforms, is now smaller than previously, despite the addition of musl x86_64/arm64 shared libs.

Community hero of the month: Mark Bradley who announced he would be speaking GopherConUK 2024 in August. He his topic will be "Using Pact to deploy Microservice with confidence". He has previously posted videos and guides on how to get started with Pact in PHP and Go.

July​

As you may be aware, there are multiple places where one can get help or request changes to the Pact ecosystem, either across the whole ecosystem, or for an individual repositories. Canny, our public roadmap, GitHub project boards on individual repositories, Slack to name a few.

Some of Pact's maintainers also work together, and as such conversations, discussions and agreements can be made but not consistently communicated, leaving users, for example who don't frequent Slack, or one of our maintainer sessions, to feel excluded from conversations.

As such we decided to deprecate our Canny roadmap and have migrated the issues to GitHub, in our Roadmap repo, to keep issues close to where the code is.

To try and counter some of the concerns around the decision-making process, we felt a RFC (Request for comments) process would be beneficial to allow for a record of proposed changes and decisions, and provide a central place to users, contributors and maintainers to go.

  • You can read about the accepted process here

You can get involved via GitHub, but we also catch once every two weeks in our Maintainer meets.

  • 10am-10:45am UTC (11am GMT / 8pm AEST)

You can download a calender invite from our repo

A google document holds our agenda which is openly editable and where anyone can table ideas for discussion.

  • πŸ§‘β€πŸ’» Pact Mock Server v2.0 is here \o/

We mentioned in April, that Ron was redesigning Pact Mock Server, as the existing mock server implementation was written in 2017-2019, and contained some esoteric TLS code that was more complex to upgrade to Hyper 1.0 than to rewrite it using newer Hyper 1.0 constructs.

Upgrading to Hyper 1.0 also brought us the following benefits:

  • Supports both HTTP 1 and 2 with the same server implementation
  • Supports protocol upgrades (leading to supporting things like Web Sockets)
  • Middleware support
  • No more need for the custom TLS code

Check out the release log to find out what went into the rewrite, and watch out for the updated mock server making it's way through the Pact ecosystem shortly.

  • πŸ§‘β€πŸ’» It's been nearly 2 years since we introduce the Pact Plugin framework to the world.

We've seen 2 plugins created by Pact maintainers (pact-protobuf-plugin, pact-csv-plugin), 2 created by non-maintainers (pact-avro-plugin, in-house json-rpc plugin) and provided a course to guide you on how to build your own plugin (pact-matt-plugin).

We know there are some rough edges, and we have been mulling over what the future of Pact-Plugins could look like. We want to start gathering feedback from users, maintainers and plugin authors, even if you tried it out and got stuck. We will see an RFC (request for comments) ticket being raised in the Roadmap soon and we would like to hold some group sessions to discuss, where participants will get to earn some swag for their time, as well as the satisfaction of being able to shape Pact Plugins destiny, whatever that may be!

Community hero of the month: Val Kolovos for continuing adding features to pact-python's v3 interface with the rust core, such as async messaging and matchers. Read about it here

Aug​

  • πŸ§‘β€πŸ’» The RFC process is approved. Bring on the changes.
  • πŸ§‘β€πŸ’» Bas Djistrka from OnTestAutomation launched a new course, Practical contract testing with Pact
  • πŸ§‘β€πŸ’» Pact compatibility suite, I've mentioned it a couple of times, so what actually is it?

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.

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 hero of the month: Augusto Colombelli for his blog post Contract Tests β€” APIs Guided by Consumers, which you can read over on Medium here.

Sept​

Community hero of the month: Murat K Ozcan has recently been taking an adventure in the world of Pact, after picking up Marie & Lewis' Contract testing in Action book. He has written 3 posts which are well worth a read.

Oct​

  • πŸ§‘β€πŸ’» Pact-Net V5 is launched! Read about it here
  • πŸ§‘β€πŸ’» A suite of message pact workshops were created to help users get started. See it here
  • πŸŽ‰ Pact Slack now has over 6 thousand members!

We were really proud to say we have just crossed the 6k mark, with 6005 members in our general channel in Pact Slack.

We appreciate many users journeys through Slack are transient, either whilst they are getting started with the Pact ecosystem, or after some help, and encounters may be all but fleeting. It is worth noting that not an insignificant amount of us have had the good fortune of meeting new friends, both in person, and virtually, making professional relationships and providing springboards to new opportunities. Some of the interactions have had positive life-changing impacts, your authors journey included.

We are proud to be able to foster a safe environment, where people are welcome to discuss contract testing with a captive audience, and for every engineer who finds that eureka moment where contract testing, just clicks, we know it is improving the API delivery landscape massively and has a net benefit to many interactions we have in our day-to-day life with systems.

If you are proud about the positive impacts Pact has had in your place of work, why not share it with the world? We can provide you a platform, and sharing your engineering mistakes and successes, is a great way to build transparency and trust with your customers, and promote a healthy learning based culture in your organisation.

Community hero of the month: Lewis Prescott for taking to the stage at CypressConf to teach users about the fundamentals of contract testing as well as how to implement consumer-driven contract testing with Cypress + Pactflow.

Nov​

  • πŸ§‘β€πŸ’» We've saw a few improvements in the pact-ruby project
    • V3 & V4 Generators thanks to Steve Taylor
    • Pact-provider-verifier now works with Rack 3, after we decided to fork rack-reverse-proxy in order to provide backwards compat with Rack 2 but allow for forwards compat with Rack 3+
    • Tweaks to Pact contract generation and verification, after ruby json 2.8.0 changes the way that JSON.pretty_generate renders empty collections such as arrays or objects. This allowed us to ensure that contracts generated with pre and post json 2.8.x behave in the same way.

I mentioned back in August, about the sbmt-pact project, which afforded users the ability to leverage the Pact V3 & V4 specification in Ruby.

I've spent a bit of time with the project, to see what changes I would need to make, to allow the functionality to slot into Pact-Ruby and allow for the minimum changeset, for existing pact-ruby users. I'm pleased to say that I've got pretty far and have documented in this issue TODO: link to sbmt-pact issue.

I've tested this out in real-world Ruby projects.

  • Pact-Broker:
    • sbmt-pact can verify existing v2 pacts generated by the Pact-Ruby core, and v2/v3/v4 pacts generated by the Pact-Rust core.
  • Pact_Broker-client
    • sbmt-pact can create v2/v3/v4 pacts

Community hero of the month: Ben Brugman & Ashley Gautama - For reaching Pact Nirvana, at their organisation, across many many teams. Read his celebratory post here

Dec​

  • πŸ§‘β€πŸ’» A set of new proposals for discussion in the Pact Plugin ecosystem. Wondering what plugins are? Read the quick start
ProposalStateDiscussion
V2 Plugin InterfaceDrafthttps://github.com/pact-foundation/pact-plugins/discussions/83
Support script language pluginsDrafthttps://github.com/pact-foundation/pact-plugins/discussions/84
Support WASM pluginsDrafthttps://github.com/pact-foundation/pact-plugins/discussions/85

Community hero of the month: Ruth - A long time pact-jvm user, Ruth has been in contact with the team over several issues in her Pact setup, and has provided some of the best reproducible examples I've come across. Glad to see Pact doing so well for you in your organisation, maybe next year we can get you to do a guest blog post. No pressure, but that also applies to my readers. It could be you here, in our wrap up for 2025!

See you next year folks​

Thanks for everyone's efforts in using, promoting, and preaching about Pact to everyone you know, now its our time to repay the favour.

If you've done something great, and want to share it, get it listed - the site is open source and you can edit any page, we want to give you a platform to help amplify your voice!

Maybe there is time to get one last video/blog or PR in before crimbo! No, only joking, that’s a wrap for this year's Pact Open Source Almanac, pop your feet up, enjoy your puds and hope to see your name in the book next year.

Β· 4 min read

Pact Almanac 2023​

Grab your hoverboard, and get prepared for another trip back to the future, with our round up of this years Pactivities in our seasonal Pact Almanac.

image

We had a raft of code features, patches, fixes and new projects added to the Pact-Foundation over the year. If you haven't read our monthly blog posts, you can read a round-up of the most significant changes from each month in there. Check out the side-bar to the left to view the older posts.

I've mainly focused on video content this time round, where you can find multiple advocates of Pact, spreading the word of not just how to do contract testing, but the why. I hope you'll enjoy them, be sure to like and comment on the videos, whether it's to show your appreciation or you just fancy a debate.

Oh, and if you are the debating type, why not join us in a fireside chat next year?

Anyhow, let see what each month has in store for us.

January​

Kicking off the year, we introduce a blog post from eBay titled API Evolution Is a Challenge. Could Contract Testing Be the Solution? You can read it here

Feb​

Diego Herrera introduced spoke at at EdinburghJS with a talk titled Testing services with Pact. Watch it here

Mar​

Holly Cummins discusses how contract tests combine the lightness of unit tests with the confidence of integration tests, and should be part of your development toolkit. Watch it here

Apr​

Lewis Prescott caught up with Janet Gregory and Lisa Crispin (Authors of the famed Agile Testing book), where they talk about how to use holistic testing with microservices and contract testing. You can watch it here.

May​

In this k6 Office Hours episode, Developer Advocates Marie Cruz (long time Pact friend) and Paul Balogh discuss what contract testing is, if schema testing is the same as contract testing, and how to do schema validation testing using Grafana k6. Check it out here

June​

gRPC and Protobufs are increasing in popularity, however, there are multiple classes of problems that may result in API breaking changes. In this video, we show how you can apply contract testing to gRPC and Protobufs systems using Pact and its Plugin framework. Watch Matt, show a quick demo of it in action here

July​

Dave Farley from Contiunuus Delivery explains why Contract Testing For Microservices IS A MUST, in his video here

For our Polish speaking friends, you can watch Jakub MaΕ‚yjasiak from Ocado Technology, talk about How Pact is more than just contracts and tests, here from a local meet up WrocΕ‚aw.

Aug​

DPoint, helped demystify contract testing, in this video here, you can also see it in action with Spring Boot demos for both producers and consumers.

Sept​

Ebay explains Consumer-Driven Contract Testing and how could they use it to improve testing their Microservice APIs with Pact? Watch their video where dive into the theory of Contract Testing, the potential benefits of using it, and some practical examples, here

Oct​

It was Pact's 10th Birthday, and you can find your map to all the resources that came out of our month long celebration in this blog post.

LambdaTest spoke with Bas Djistrka about Solving the Integration Testing Puzzle with Contract Testing, as part of the Voices of Community series. You can watch it here

Nov​

Matt Fellows spoke at Testing Talks Conference in Melbourne, where he provides a comprehensive guide to Pact. Watch it here

Dec​

Angelo kicked off December with a tutorial showcasing interoperability with a PHP backend and JavaScript frontend powered by contract testing, watch it here

See you next year folks​

Thanks for everyone's efforts in using, promoting, and preaching about Pact to everyone you know, now its our time to repay the favour.

If you've done something great, and want to share it, get it listed - the site is open source and you can edit any page, we want to give you a platform to help amplify your voice!

Maybe there is time to get one last video/blog or PR in before crimbo! No, only joking, that’s a wrap for this year's Pact Open Source Almanac, pop your feet up, enjoy your puds and hope to see your name in the book next year.

Β· 10 min read

⏳ And just like that, 2023 draws near​

We at the Pact team love nothing more than making microservices testing easier, our community and churning out the code. This year has been no exception. As many of you have wrapped up for your christmas break, we thought we would take some time to reflect on the year and the communities achievements.

Pact Open Source Community Survey​

Our new survey is now open! The purpose of this survey is a pulse check on the community. In order to serve you in the best possible way, we'd love to understand how you use Pact and engage in our ecosystem. If you have contributed to any Pact Open Source projects or have engaged with Pact social media and Slack chats, you are welcome to share us your thoughts! The data collected in this survey is anonymous. We intend to use the data to better serve you and to promote the Pact community. Complete the survey here.

Brought to Life through Visualizations​

Earlier in the year we mentioned we rolled out Orbit.love to help us track activities across the Pact Foundation's many open doors.

I would login into GitHub, Slack, YouTube, Slack Overflow, Twitter, check my emails, all before I could get down to any work. I imagine the story is much the same for our maintainers, when they get that precious free time to code, it can be exhausting. Orbit gives me a single view I can go to every day, and see who is posting asking for help, or where the activity is, so I can come jump in a help out.

We’re still in the process of determining the most effective usage and views of the data, in a wider context rather than just helping us on the day to day. We are thinking about ways we can expose the dataset (as it’s all publicly available information from GitHub), so that you can tell us what you make of it. Think of it as an interactive state of open-source survey if you will! The good news is that we’ll be doing so together with our friends over at the Cucumber and Swagger communities. We even hope to extend it over the SmartBear GitHub account too.

Pact community engagement in 2022​

Community growth in 2022​

We saw over 3,000 of you interacting with us via our open source channels, and introduced 2.7k more into the fold.

The 2022 community heroes.​

Thank you for participating in the Pact community, we couldn’t do it without you.

We really couldn't resist taking a look at what organizations are using (and we hope loving) Pact. The list below is ordered by organization employee count.

We're a small team at Pact, so we also rely and appreciate contributions by teams and individuals leveraging Pact. Below is a list of organizations ordered by the active members using Pact who have interacted with our public repos. In most cases, these are individual people, or small teams often giving back improvements to the Pact framework from time out in the field. Why not read some of their testimonials and case studies here and add one of your own πŸ₯°

Community growth since 2013​

We looked back on the history as Pact, as we near 10 years, over 12 thousand of you have followed along.

I wrote an interactive history lesson of Pact which you can check out here

Big innovations: the Pact Plugin Framework​

We were pleased to launch the Pact Plugin Framework to the masses. As with all our major initiatives, it is true to our open source roots and we hope that unlock new capabilities to a community of builders.

Our first plugin provides support for testing gRPC with Pact, and Pacts core, built in Rust, provides a Foreign Function Interface, unlocking Pact’s capabilities in supporting languages.We look forward to 2023 and the introduction of Pact’s feature-set to a few more languages, some of which are waiting to be built.

Hopefully by you!

In the meantime, why not get powered by Pact plugins and create your own?

Find out how to get started

Supporters of Pact​

Pact’s biggest sponsor got even bigger this year.

SbHeartPact

Pact arose while PactFlow's Co-Founders Beth Skurrie, Ron Holshausen and Matt Fellows were employed by Australian technology consultancy, DiUS, supporting companies of all sizes to transition to cloud-native application development and to accelerate their digital initiatives.

PactFlow is now part of a much wider quality initiative after being acquired by SmartBear. We care so much for OSS and are so pleased that SmartBear has a strong and demonstrated commitment to OSS β€” as proven through the support and scale of Cucumber and Swagger. Through our partnership, we will be able to take contract testing to new heights and help deliver key milestones in Pact’s OSS roadmap, and bring closer alignments between our now larger family of open source tools, and smooth pathways between our open source and commercial tools. Providing you a seamless, and wonderful experience, whichever tool you are using.

We are always on the look-out for new contributors, across any of our languages, and if you have interest or have used Swagger, Cucumber or BDD principles in the past, we would love to hear from you. Drop me a note in Slack.

We would also love to wish our DiUS family thanks for all the support, and helping us reach bigger heights, and ultimately help more people. We'll slip an extra shrimp on the barbie for you.

What's in store for Pact in 2023?​

With a successful 2022 under our belts, I am so excited for what 2023 has instore! You can check out Canny, our public feature board for the latest run down on upcoming initiatives.

If you feel like something is missing, why not request it, or come talk to us in our Slack?

Big call outs to get excited about​

  • Pact Plugin ecosystem – we look forward to helping the community build plugins for the most requested content and transport types
  • V4 + Plugin support in all Pact foundation supported languages
  • Support networks provided to help the community build new plugins, and language implementations
  • Improved governance and project planning
    • The Pact project is depended on, by millions. In order to improve the quality of life for maintainers and contributors, we would like to bring some best practice open source engineers principles to the Pact project, to help it evolve in a vendor neutral fashion, and live for many years for come.
  • Revised documentation, training materials and examples
    • We are on a journey to help not only simplify the adoption of contract testing, but with SmartBear’s support, to help provide you patterns and techniques to building quality, scalable software, that moves as quickly as your customers do. We would love your support in helping to smooth the path.
  • Help us design real-world example applications, that we can use to demonstrate not just Pact, but other testing tools, to show you can pick n mix your way to success.
  • More community events
    • Pact's 10th Birthday Bash
    • Local Pact community events
    • SmartBear Dev Rels’ Celebration of open source
    • Hackathons
    • Code Alongs
    • Summer of Source
    • CukenFest - A BDD Conference
    • Pact + Swagger + Cucumber meetups

Pact Almanac 2022​

I always love the idea of Almanac’s, probably from being sucked into Back to the Future as a kid!

image

So here is my go, a veritable buffet, corralling of some of the best bits of the year, mainly in your own words. There is so much good juice out there, for this Devo Avo to squeeze. I won’t focus on any of the big milestones centrally in the project, but rather your individual contributions and wins, you can go through our blogs bi-monthly updates, or check the GitHub repo’s themselves for an immutable source of truth. πŸ•΅οΈ

January​

Feb​

Mar​

  • Lewis Prescott, the Pactman himself, started his blog series and Podcast dedicated to our favourite topic with some of the players in the industry helping you calm the chaos.

Apr​

May​

  • Marie Drake again, delivering a contract testing 101 at her previous employer Zoopla where she evangelised Pact, she now works as a Developer Advocate as k6.io and is always putting out great content.
  • Tamerlan Gudabayev delivers a great post that helps what contract testing is, and where it fits in in your testing lifecycle.

June​

July​

  • Bas Dijkstra has been helping individuals, teams and organisations build quality systems for years with automation. This in-depth 6-parter are words from a sage.

Aug​

Whilst this feature in a Pact Broker, exists only in PactFlow (our commercial sponsor and guardian) the source code is open source and lives here for the underlying tool. If you want to help make improvements or use it to aid and augment your testing efforts with your OSS Broker, or if you use other mechanisms bar a broker to share pacts. If you do, we would love to what you are up to!

Sept​

Oct​

Nov​

Dec​

Pact Broker Graph

Pact saves the holidays, by ensuring those in charge of getting the turkeys to your table are deploying safely!

If you've done something great, and want to share it, get it listed - the site is open source and you can edit any page, we want to give you a platform to help amplify your voice!

Maybe there is time to get one last in before crimbo! No, only joking, that’s a wrap for this year's Pact Open Source Almanac, pop your feet up, enjoy your puds and hope to see your name in the book next year.

Β· 13 min read

Did you know, Pact is nearly 10 years old!

As the de-facto leader in contract-testing, the eco-system has grown to be vast, just take a look below

image

However today, I am going to take you on a little journey of how it came to be, and show you what is to come.

TL;DR​

A lot happens in 10 years. We’ve seen it all here at Pact, from the proliferation of micro services, to ever increasing protocols likeΒ Protobufs,Β GraphQL, transports such asΒ gRPC,Β WebsocketsΒ andΒ MQTT,Β EventDrivenArchitecturesΒ and data pipelines or emerging standards such asΒ OpenAPI, AsyncAPIΒ andΒ CloudEvents.

As we launch our Pact Plugin Framework bringing you new possibilities to the Pact eco-system, I’d like to invite you to try an interactive history lesson of Pact, from past, to present and beyond!

Pact and the Pact-Plugin Framework will unlock the possibility of testing multiple transport and content types. You will see Pact used for gRPC, Protobuf and CSV based messages. Hope it feeds your imagination of the possiblities, it certainly has for me!

image

If it piques your interest, you should sign up for our upcoming webinar to hear more about our exciting news and what it means for you and the software development community.

The birth of Pact Ruby​

Pact was originally written by a development team at realestate.com.au in 2013, born out of trying to solve the problem of how to do integration testing for their new Ruby microservices architecture. They threw together a codebase that was to become the first Pact implementation.

git add . && git commit -m 'Gem skeleton' && git push by James Fraser

Screenshot 2022-11-16 at 14 16 59

Ron Holshausen (at the time at DiUS, still one of the present day maintainers of Pact, and co-founder of PactFlow), first commit came shortly after.

Screenshot 2022-11-16 at 14 27 47

A few months later Beth Skurrie (then at DiUS, still one of the present day maintainers of Pact and co-founder of PactFlow ), joined one of the teams that was working with the Pact authors' team.

She had recently seen a talk by J.B.Rainsberger entitled "Integration tests are a scam", which promoted the concept of "collaboration" and "contract" tests, so she was immediately interested when she was introduced to Pact.

J. B. has since softed his message, as have we, I think we all mellow as we get older :)

Beth's first commit in Pact Ruby

Screenshot 2022-11-16 at 14 33 02

After trying (as most people do) to convince the authors that the provider should be the contract writer, she was soon convinced by Brent Snook, one of the original authors of Pact, of the value of consumer driven contracts. At this stage, she realised that what was missing in the current implementation was the ability to run the same request under different conditions, and "provider states" were born.

Viva la Pact Broker​

Screenshot 2022-11-16 at 14 28 48

What the heck is a Pact Broker anyway, Saf?​

The Pact Broker (as Pact was) being written to solve our own problem, which was trying to coordinate pact versions between projects.

It is an application that allows you to release customer value quickly and confidently by deploying your services independently and avoiding the bottleneck of integration tests, introducing a pact matrix.

It looks a little like this

image

By testing the Pact Matrix, you can be confident to deploy any service at any time, because your standalone CI tests have told you whether or not you are backwards compatible – no β€œcertification environment” needed. And when there are multiple services in a context, this approach scales linearly, not exponentially like the certification environment approach.

Preaching the message​

Soon after, Beth decided that Pact idea was the best thing since sliced bread, and she hasn't stopped yacking on about it since. Hear Beth, Jon Eaves from REA and Evan Bottcher from ThoughtWorks speak at YOW!2014 in this YouTube video

Want a bit more of Beth? we told you she couldn't stop yakking

Ron began spreading the message, read a blog post from 2014 here

The birth of Pact JVM​

Pact spread around the codebases in the wider program of work at realestate.com.au, until it hit its first Java microservice. realestate.com.au had many JVM projects, so a group of DiUS consultants (including Ron Holshausen again) started the pact-jvm project on a hack day.

Screenshot 2022-11-16 at 14 37 32

Ron raised his first issue, https://github.com/pact-foundation/pact-jvm/issues/31, which led to his first PR

Screenshot 2022-11-16 at 14 43 27

You can watch a talk from Ron here talking about pact and Pact JVM

Like all grown up frameworks, processes are needed, and a Pact Specification was born.

Beth penned the first Pact test cases, which came to be Pact Specification v1.0.0

Screenshot 2022-11-16 at 14 45 42

It was at this stage that the authors realised that the Rubyisms in the format were going to have to be replaced by a non-language specific format, and the idea of the v2 pact-specification arose on Mar 27, 2014 though it would take a while (just over a year) before it became reality.

Screenshot 2022-11-16 at 14 53 18

Soon it became obvious that Javascript UIs would benefit greatly from using Pact with their backend APIs.

After tossing around the idea of implementing Pact yet again in another language, a decision was made to wrap the Ruby implementation (which was packaged as a standalone executable) to avoid the maintenance burden and potential of implementation mismatches. This became the pattern that was used for most of the following Pact implementations. Each language implemented a Pact DSL and mock service/verifier client, and called out to the Ruby mock service process/verifier in the background. The original Ruby JSON syntax was often used between the native clients and the mock service, as it was simpler to implement, however, the mock service took care of writing the actual pact in the v2 format.

The birth of Pact JS​

Three versions of Pact-JS have existed, Fuying created the first commit of DiUS/pact-consumer-js-dsl. A familiar face Beth pops along for her first commit.

A few days apart, DiUS/pactjs0 was created, the first commit by Jeff Cann. Ron dropped his first commit ultimately deprecating it a little while later.

Enter Matt Fellows, dropping his first commit. A man of many talents, Matt is still one of the present day maintainers of Pact, as well as co-founding PactFlow.

It's funny, JavaScript is akin to the bus service, you wait for ages and then three turn up at once 🀯.

Enter the still current Library, Pact-JS. It's first commit by Tarcio Saraiva.

A few months later, Pact-JS became the sole library going forward

This multi-language capability gave us the ability to start building cross-platform contract testing suites, as demonstrated below with JSON/HTTP interactions in laser focus

image

You can out HTTP based Pact in our interactive tutorial here, in either Java or JavaScript

Pact proliferates - Lead by example​

Since the implementation of the v2 format, newer features have been added, and the v3 and v4 formats add support for handing multiple provider states, messaging, and 'generators'.

One of the strengths of Pact is its specification, allowing anybody to create a new language binding in an interoperable way. Whilst this has been great at unifying compatibility, the sprawl of languages makes it hard to add significant new features/behaviour into the framework quickly (e.g. GraphQL or Protobuf support).

Wrapping the Ruby implementation allowed new languages to implement Pact quickly, however, it had its downsides. The standalone package worked by bundling the entire Ruby runtime with the codebase using Travelling Ruby, so it was large (~9MB). The native libraries also had to deal with the mock service process management, which could be fiddly on different platforms. It also made it difficult to run consumer tests in parallel, as each mock service process could only handle one thread at a time. The Ruby implementation was also lagging behind in feature development compared to the JVM, as Beth was spending more time on the Pact Broker.

To provide a single Pact implementation that could be used by all the required languages, the decision was made to create a reference implementation in Rust, that could be wrapped by each client language using FFI. The distributable package will be orders of magnitude smaller, and make it easier to run tests in parallel and avoid the process management issues, we have been slowly moving to our Rust core which solves many of the challenges that bundling Ruby presented.

It is worth noting that the "shared core" approach has largely been a successful exercise in this regard. There are many data points, but the implementation of WIP/Pending pacts was released (elapsed, not effort) in just a few weeks for the libraries that wrapped Ruby. In most cases, an update of the Ruby "binaries", mapping flags from the language specific API to dispatch to the underlying Ruby process, a README update and a release was all that was required. In many cases, new functionality is still published with an update to the Ruby binary, which has been automated through a script.

Beth often refers to the Ruby Goldberg machine, in a nod to Rube Goldberg.

image

We would love your engineering support in bringing efficiencies to our CI/CD processes used in our open source projects, or your artistic skills, if someone fancies drawing a Pact Rube Goldberg machine <3

Moving beyond HTTP​

But, the industry has continued to innovate since Pact was created in 2013, and RESTful microservices are only one of the key use cases these days - protocols such as Protobufs and Graphql, transports such as TCP, UDP and HTTP/2 and interaction modes (e.g. streaming or server initiated) are starting to become the norm. Standards such as AsyncAPI and CloudEvent are also starting to emerge.

image

For example, Pact has been a rather HTTP centric library, and the mixed success in retrofitting "message support" into all languages shows that extensions outside of this boundary aren't trivial, and in some respects are a second class citizen.

The reason is simple: HTTP doesn't change very often, so once a language has implemented a sensible DSL for it and integrated to the core, it's more a matter of fine tuning things. Adding message pact is a paradigm shift relative to HTTP, and requires a whole new developer experience of authoring tests, integrating to the core and so on, for the language author to consider.

You can read more about non-HTTP messaging with Pact πŸ”— here

Please note this one is a pet-project work in progress but it does show off message testing in various pact languages (Java, JS, .NET, PHP, Python & Ruby)

image

Pact Plugin Philosophy​

Being able to mix and match protocol, transport and interaction mode would be helpful in expanding the use cases.

Further, being able to add custom contract testing behaviour for bespoke use cases would be helpful in situations where we can't justify the effort to build into the framework itself (custom protocols in banking such as AS2805 come to mind).

To give some sense of magnitude to the challenge, this table showed some of the Pact deficiencies across popular microservice deployments as of a couple of years ago

https://user-images.githubusercontent.com/53900/103729694-1e7e1400-5035-11eb-8d4e-641939791552.png

So the pact plug-in eco system was born, a way to allow new transport types, content matchers/generators and more to easily be added to the pact framework, without needing to wait for the core maintainers to roll it out. You can create your own, for public, private or commercial consumption!

image

Enough blurb, show me da code​

Whilst it may be quite technical for some, others will relish the possibilities this will unlock. If you want something or see a use case, but aren’t quite sure how to put it to reality, try out our demos and give us a shout via πŸ”— canny, our feature request board, or πŸ”— slack

To prove how easy it was, and as a nice little nod back to the Grandmother of Pact, Ruby. Your very own devo avo put his money where his mouth is and built his own.

Try out our pact plug-in framework here​

This will allow you to see Pact and the Pact-Plugin Framework to test multiple transport and content types. You will see Pact used for gRPC, Protobuf and CSV based messages. Hope it feeds your imagination of the possiblities, it certainly has for me!

And to anchor it back to a picture you probably know from our Pact docs, plugins just sit in the middle and help extend the capabalities

image

Choose Possibilities, Choose plugins, Choose Pact!

A thank you to those who got us here​

Β· 3 min read

Pact with more power – introducing the Pact Plugin Framework​

Today we share the news that your favourite contract testing framework comes Pact with more power! The new Pact Plugin Framework completes the missing piece to help development teams apply contract testing all their API technologies and use cases.

note

Replay the launch webinar to hear Matt and Yousaf explain the Pact Plugin Framework

Why we built the Pact Plugin Framework​

Loved by thousands of development teams globally, Pact was originally created to support the rise of RESTful microservices and has since expanded to support asynchronous messaging, becoming the defacto API contract testing solution.

As architectures have evolved, organisations find that the existing Pact contract testing framework may not support all of their use cases.

The industry has continued to innovate since Pact was created in 2013, and RESTful microservices are now only one of the key use cases today. According to SmartBear’s 2021 State of Quality report, we are seeing the growth of:

  • Protocols such as Protobufs and GraphQL (80% of organisations run multi-protocol and more than 60% of organisations manage three or more)
  • Transports such as gRPC, Websockets and MQTT
  • Newer interaction models such as streaming, async or server push
  • Event Driven Architectures and data pipelines
  • Emerging standards such as AsyncAPI and CloudEvent

Pact Plugin Framework now live​

The Pact maintainers have been acutely aware of the changing trends – we blogged about the idea for the Pact Plugin Framework in 2021 and have been actively chipping award at the roadmap item to enable developers everywhere to use contract testing where they previously couldn’t.

Hats off to Ronald Holshausen who undertook the mammoth task of standing up the Framework. With this, development teams can now harness the power of contract testing where they previously couldn’t, applying it to unique and emerging use cases and technologies - no matter the scale or the language, transport, protocol or content type.

How this new capability works​

Pact may have been applied to one team or application using RESTful microservices but another using GraphQL, have been unable to get the complete benefits of contract testing. The Plugin Framework is the answer – developers can build plugins for their custom needs, whether they open source the plugin or keep it closed source for in house only usage.

For those familiar with Pact, this is a substantial innovation. By having a single generic interface, the Plugin Framework side steps the problems of requiring the input of core maintainers to support a new feature and its constituent concepts that must be built into each client language.

Read the full use case for the Plugin Framework is explained in detail on the GitHub issue.

Getting started​

If you’re as excited by this new feature as we are, you can:

  1. Replay the launch webinar to hear Matt and Yousaf explain the Pact Plugin Framework
  2. Build your own plugin for any use case you and your team require – visit the guide to writing your own plugin
  3. Try out a pre-made plugin - visit the implementation guide for GPRC