Bal
03/28/2023, 4:53 AMTimothy Jones
03/28/2023, 5:04 AMTimothy Jones
03/28/2023, 5:04 AMTimothy Jones
03/28/2023, 5:05 AMTimothy Jones
03/28/2023, 5:07 AMThen each of my consumer now will write basically some 80% identical tests because most of them require the same response from the same endpoint ?Do they really require the same response? Usually different consumers want different parts of the response from the same endpoint. Without Pact, testing this will still have some duplication. It might indicate that there’s a client library that’s worth splitting out or something.
Bal
03/28/2023, 5:09 AMYou don’t have to have the consumer design the provider endpoints. Consumer driven design is different to consumer driven testing.Oh, so I could use pact to verify the interaction after the spec is laid out ?, so is this an acceptable flow ? 1. provider design first, output via openapi spec 2. consumer view the spec, write the test for their expected response 3. provider then write their own side of pact
Bal
03/28/2023, 5:09 AMWithout Pact, testing this will still have some duplication. It might indicate that there’s a client library that’s worth splitting out or something.Hmm, I agree
Timothy Jones
03/28/2023, 5:11 AMTimothy Jones
03/28/2023, 5:12 AMBal
03/28/2023, 5:12 AMthey write a test that verifies the consumer(s) pacts.Oh sorry, yes I mean this
Timothy Jones
03/28/2023, 5:13 AMBal
03/28/2023, 5:13 AMTimothy Jones
03/28/2023, 5:13 AMTimothy Jones
03/28/2023, 5:13 AMTimothy Jones
03/28/2023, 5:13 AMTimothy Jones
03/28/2023, 5:14 AMBal
03/28/2023, 5:14 AMA consumer driven testing approach doesn’t force you in to a consumer driven design.This is maybe what I miss when I read how the pact works
Timothy Jones
03/28/2023, 5:14 AMBal
03/28/2023, 5:14 AMBal
03/28/2023, 5:15 AMTimothy Jones
03/28/2023, 5:15 AMTimothy Jones
03/28/2023, 5:19 AMbecause of our current workflow is 180deg different on what pact offer that is Consumer-Driven.This is definitely the most common way to design APIs at the moment, and I’ve worked with teams who are thinking and working this way to successfully use Pact without changing the way they work.