Hi <@U9UUY3CU9><@U9UUY3CU9><@U9UUY3CU9>@Matt (<pac...
# general
e
Hi @Matt (pactflow.io / pact-js / pact-go)@Matt (pactflow.io / pact-js / pact-go)@Matt (pactflow.io / pact-js / pact-go)@Matt (pactflow.io / pact-js / pact-go)@Matt (pactflow.io / pact-js / pact-go) and team, Ive asked this via twitter but is it viable to use contract testing if our app has heaps of integration with third-party services like zendesk, salesforce, etc. If yes, whats the best way to do it? For context, we don’t have automated integration and api tests yet.
m
Hi!
For 3rd party tests, because they won’t be able verify your contracts, Pact style tests will only add a little value (see our AMA on the subject: https://docs.pact.io/help/amas#join-an-upcoming-ask-me-anything-ama-session) For 3rd party tests, there are a couple of options; 1. If they are untrusted, you could use record/replay style tests, but this gets hard because you need to be able to handle state. Essentially, you’d be building an approval based workflow, where tests are run on a regular basis and any failed tests need to be manually reviewed/approved. This will require more upkeep, but might be helpful in situations where the 3rd party is unreliable 2. You could use a static style check, where you compare your consumer usage to a defined spec given from the provider. This type of testing assumes the 3rd party is likely to be competent (as would be the case with Zendesk). You might find that https://docs.pactflow.io/docs/bi-directional-contract-testing/ could work for you, in this case (note it’s not an OSS feature)
👍 1
e
Thanks matt for the detailed explanation. I will explore it further and check out the links you have provideex
👍 1