Skip to content

OpenAPI-based Testing Tool (Provider Drift) #31

@mefellows

Description

@mefellows

Dredd is dead

Dredd, the previous de-facto spec-based API testing tool has officially been archived (https://github.com/apiaryio/dredd) and is no longer being maintained.

Currently, (In PactFlow's Bi-Directional Contract Testing) we rely on the Provider API to publish an OAS using an external tool of their choosing (see #4 for common tools), and rely on that process to ensure the provider itself is compatible with the OAS.

We would like to change this situation.

We believe the current OAS testing ecosystem has limitations that could be alleviated with further improvements, including the added information from a consumer contract.

Challenge with spec-based testing

In short, the challenge:

Schemas are abstract, and introduce ambiguity which can lead to misinterpretations. For instance, in an OAS you may define that an API can return a 400, a 403 or a 200, but you cannot say for certain which specific set of inputs will result in those status codes by looking at the specification alone.
Coverage - for the same reason as (3), it's easy to check if a system is compatible with a schema, but it's very difficult to be sure it fully implements the spec. For example, we know of no such tool that can currently do this for OAS.

Having the consumer usage information for comparison, means that we can be sure any ambiguities in a schema are accounted for.

This feature involves:

  • Creating a spec-based CLI API verification tool to support OpenAPI specifications (and others) as contracts, including the ability to enhance an OAS document with test cases to provide concrete example requests and responses
  • Publishing the new verification results back to Pactflow
  • Incorporating these results in PactFlow's BDCT feature, comparing the published consumer contract against the custom verification results to improve the contract testing guarantees, whilst simplifying the contract testing model

See also

Metadata

Metadata

Assignees

No one assigned

    Labels

    Q4Initiative is planned for a Q4 launchfeature requestNew feature or requestfeedback-wantedCustomer feedback is requested to help validate and refine the feature

    Type

    No type

    Projects

    Status

    Planned (1-3 months) / Q4 2025

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions