Brett Knapik
03/13/2023, 5:34 PMTimothy Jones
03/13/2023, 10:39 PMTimothy Jones
03/13/2023, 10:40 PMBrett Knapik
03/13/2023, 10:49 PMTimothy Jones
03/13/2023, 10:52 PMTimothy Jones
03/13/2023, 10:52 PM2.) A developer added a new endpoint/producer/consumer and they forgot to add a pact test for it.How would you solve this for other test types like e2e or unit tests? This doesn’t feel like a problem that should be solved with tooling
Timothy Jones
03/13/2023, 10:54 PM1.) we are rolling out contract testing using Pact. How can we measure what endpoints/producers/consumers are missing tests with Pact. We have 60+ microservices, so onboarding pact is quite an effort.I think this is a great question
Timothy Jones
03/13/2023, 10:55 PMTimothy Jones
03/13/2023, 10:59 PMTimothy Jones
03/13/2023, 11:00 PMconst api = (baseurl: string): Api => {
const server = makeAxiosConnector(baseurl);
return {
getAllProducts: () => server.authedGet<string[]>('/products'),
getProduct: (id) => server.authedGet(`/products/${id}`),
getUser: (id: string) =>
server.authedGet<User>(`/users/${id}`).catch((e) => {
if (e.code === API_NOT_FOUND) {
throw new UserNotFoundConsumerError(`Unable to find user '${id}'`);
}
throw e;
}),
....
};
};
Timothy Jones
03/13/2023, 11:01 PMTimothy Jones
03/13/2023, 11:02 PMMatt (pactflow.io / pact-js / pact-go)
Brett Knapik
03/14/2023, 1:06 PM