Investigate contract testing
Description
Investigates the possible use of API contract testing
Further details
Contract testing is a testing approach that ensures that two separate systems, such as a client (consumer) and a service (provider), can communicate as expected based on a predefined contract. Instead of relying on full end-to-end tests, contract testing verifies that both parties adhere to agreed-upon request and response structures. Tools like Pact enable this by allowing consumers to define expected interactions, which providers then validate against, ensuring backward compatibility and preventing integration issues. This method is particularly useful in microservices and API-driven architectures to maintain reliable and scalable integrations.
We auto-generate the OpenAPI specification as part of the pipeline, so this should be incorporated if possible.
Task list
- We want to be able to run this in our CI pipelines.
- As low as possible additional config would be preferable.
Acceptance criteria
-
Investigate usefulness and ease of setup of potential contract testing tools, with outcomes documented in this issue.