Contract Testing

Prism

Link: https://stoplight.io/open-source/prism

Features:

  • based on openapi spec

  • can create mocks based on spec

  • can validate request/response based on spec, and forward request to either a fake or the actual service afterwards

  • http requests only

Pact

Link: https://pact.io

Features:

  • “contract by example” – contract testing based on actual request/response from services

  • will store the request/response, and will validate if it adheres to expected request/response

  • supports http requests and kafka messages