Contract testing on VA.gov is accomplished using Pact.
Pact is a tool that enables consumer-driven contract testing (CDCT) by defining a contract between service consumers and providers (e.g.
vets-website applications and
vets-api). As explained by Pact, “Contract testing is a technique for testing an integration point by checking each application in isolation to ensure the messages it sends or receives conform to a shared understanding that is documented in a 'contract'.“
In this way, Pact enables you to test integration points with
vets-api in a non-production environment. and ensure that your app is production-ready. It helps the Platform ensure that platform-wide changes are non-breaking. Pact allows us to catch issues with integrations before they reach production.