Skip to main content

19th Nov - Online Pact Community Event

Slides and Resources​

How maintainers use Pact - Tim Jones

Questions from the event​

Who typically writes and executes the Pact tests?​

The idea is that the teams building either side of the interaction write the Pact tests. This way, if the Pact tests are close to the actual runnning code (and exercise the actual code), you avoid the issue of drift where the tests and the actual running system diverges.

See Who would typically implement Pact? in the FAQs

How can I tell if I have good coverage of an API with my pact tests?​

Now that Pactflow exists, are you still going to be supporting the Pact Broker? There seems to be an obvious commercial conflict​

I'm convinced, but I don't know how to get started. It all seems too hard. What advice do you have?​

What are your tips for effectively writing and maintaining provider states?​

How can I prevent probs with pacts on several branches. What are the best practices for keeping the FE and BE dev sync without disturbing other branches.​

Can we get a status update on the progress of the Rust implementation?​

The Rust implememtation is about 95% V3 specification complete. The main missing features is to do with pending and WIP pacts. All the other features are supported inclusing newer features like the array contains matcher, and it has been integrated into Pact JS V3 beta, Pact-Go, Pact-Swift and Pact-C++.

When the payload is big and deeply nested, it's a little cumbersome to write PactDSLs by hand for the consumer. Are there any smart ways to do that?​

Do PACT tests replace integration testing? If not, why do it at all?​

Pact tests should be used to reduce your integration testing effort. If both sides of an integration can prove they adhere to the contract for the integration, then you don't need to test for that in your integration tests.

How does Pact play with something like OAS?​

Can I creat a contract describing several branches at an integration point? What if I want to ensure a green path and a red path (timeout, circuit breaker)?​

Do you have plans to provide support for setting up multiple consumer contract tests on the provider side, for the server underlying calls?​

Are there any situations where you would not recommend using Pact?​

See What is Pact not good for? from the FAQs

Does Pact support contract testing gRPC and Kafka? What languages are supported?​

Don't you think that having all PACT support focus on slack keeps PACT "in the shadows" (what's solved there is not searchable from, say, google)​

Why does Pact not support optionals?​

See Why is there no support for specifying optional attributes? from the FAQs

I've seen in the docs the warning "don't try and use Pact for functional testing". Can you explain this further?​

Can I use Pact to support UI testing?​

If Pact might be used to replace some unit tests, would that mean that we'd be using multiple states and scenarios where the ui may not care too much about it?​

When is pact-reference stable? I mean releasing 1.0.0 and other projects e.g. pact-php start using it.​

Following the Computer Science tradition of counting starting from 0, version 1.0.0 will be the second release of pact-reference after a big refactor or update.

Pact-C++ is built on top of it, Pact-JS V3 beta, Pact-Swift and Pact-Go have integrated it. There are WIP branches in Pact-Python and Pact-.Net to integrate it. It just needs someone to integrate it with each language that whats to use it.

When can we expect async messaging contract testing support for ruby?​

On what level do you advise to mock the provider application: right after the getting request / service / database?​

Is there a plan to centralise documentation, its hard to keep track of where to reach for a workshop of pact or read the PACT nirvana document.​

I know that you are already working on gRPC support. Can you share some details and progress with us? Thanks​

Clients prefer no code automation . One stakeholder liked karate as it supports BDD. We have given some presentations and demo also for PACT. How to convince?​

Could you share your views on using Rest Assured together with pact tests?​

Would you consider an error code(ie: INVALID_EMAIL) as part of the format? ie: { "error": { "code": "INVALID_EMAIL", message: "The email is invalid" } }​

What is searching algorithm of stub-server to find the matched interaction? What if we have a thousand of contract files how can we improve searching performance​

Is it possible to apply contract tests to check the communication between microservices via RabbitMQ? How could I check the queues?​

Can you provide good/more examples for integrating pact into the pipeline(s) in the documentation? Some strategies would be nice (edited)​

How to share request data between consumer and provider? To get data from user Matt by user ID 1, does the provider get this user ID from pact Context?​