How do you test UI <-> API integration?

This page summarizes the projects mentioned and recommended in the original post on /r/softwaretesting

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Pact JVM

    JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.

  • What you are looking for is called Contract Testing. You can read about it [here](https://martinfowler.com/bliki/ContractTest.html), more specifically about Consumer-Driven Contract Testing [here](https://martinfowler.com/articles/consumerDrivenContracts.html). One library commonly used for it is [Pact](https://docs.pact.io/). In your case, the UI is the consumer and the API is the provider. The consumer tests that exercise the client objects will generate an executable specification of the interactions it wants to do with the API. Then the provider can replay the requests and verify if its responses are compatible with the responses that the consumer expects.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts