FREEDOM251

Freedom251 › JavaScript Testing Frameworks

WSO2 Contract Test Runner

Free plan LinuxSelf-hosted

Visit WSO2 Contract Test Runner Alternatives Pricing

WSO2 Contract Test Runner's own site

What WSO2 Contract Test Runner is

WSO2 Contract Test Runner is an open-source library for consumer-based contract testing against live REST API endpoints. It sends requests to endpoints and compares the returned responses with expectations defined by the consumer. Each contract is a JSON file that can describe a request, an expected response, assertions, and optional post-conditions.

Assertions can check status codes, paths in JSON bodies and headers, exact values, regular expressions, empty values, structure, arrays, and objects. Suite configuration can run contracts before or after tests; contracts configured to run before a suite run synchronously before that suite’s tests. Post-conditions can extract response values into suite-scoped or global environment variables for other contracts to use. A contract can also pause for a specified number of seconds after its assertions finish.

The documented workflow runs tests in Docker, with contract and configuration files placed in a mounted volume. The README sample request uses bearer authorization and a cookie, with their values supplied through environment variables. Its example volume layout includes a certificate keystore and a client truststore. The repository identifies the project as Apache-2.0 licensed. The README lists XML path support as a todo, so the documented contract format is JSON.

Who it suits

WSO2 Contract Test Runner suits developers who need to check live REST API behavior against consumer-defined contracts. It is intended for teams that can run tests in Docker and define contracts and suite configuration as JSON and configuration files.

What it does well

  • Tests live REST API endpoints against consumer-defined expectations
  • Supports a broad set of response assertions
  • Post-conditions can share extracted values across contracts
  • Suite configuration supports before and after contract runs
  • Apache-2.0 licensed and free

What to know first

  • The documented contract format is JSON
  • XML path support is listed as a todo
  • The documented workflow runs tests in Docker

Limits

The project’s contract format is JSON, and XML path support is listed as a todo. The listed free plan is the Apache-2.0 licensed library; no paid plans are listed.

Plans

PlanBilled and limitsPrice
Contract Test RunnerApache-2.0 licensed library · no paid plans listedFree

As github.com lists them, read 5 Oct 2026. The maker's own page has the final word.

Getting started

  1. Visit the project repository
  2. Prepare JSON contract files and suite configuration
  3. Place the contract and configuration files in a mounted volume
  4. Run the tests using the documented Docker workflow
  5. Supply authentication values through environment variables when needed

Verdict

Choose WSO2 Contract Test Runner if you need a free, Apache-2.0 library for verifying live REST APIs against consumer-defined contracts. It supports a range of assertions and can pass extracted values between contracts. Look elsewhere if your contracts need XML path support, which the README lists as a todo.

Questions

Does WSO2 Contract Test Runner cost anything?

The listed plan is free. It is an Apache-2.0 licensed library, and no paid plans are listed.

What does it test?

It calls live REST API endpoints and compares their responses with predefined contract responses.

What contract format does it use?

Contracts are JSON files that can contain a request, expected response, assertions, and optional post-conditions.

How is it run?

The documented workflow runs tests in Docker, with contract and configuration files in a mounted volume.

Can contracts reuse values from responses?

Yes. Post-conditions can extract response values into suite-scoped or global environment variables for use by other contracts.

What license does the project use?

The repository identifies the license as Apache-2.0.

Facts from WSO2 Contract Test Runner's own pages

Assertions
Supported checks include status codes, JSON body and header paths, exact values, regular expressions, emptiness, structure, arrays, and objects. · github.com, 5 Oct 2026
Authentication inputs
The README's sample request uses bearer authorization and a cookie, with values supplied through environment variables. · github.com, 5 Oct 2026
Contract format
Contracts are JSON files with request, expected response, assertions, and optional post-conditions. · github.com, 5 Oct 2026
Docker execution
The documented workflow runs tests by placing contract and configuration files in a mounted volume and running a Docker image. · github.com, 5 Oct 2026
Environment variables
Post-conditions can extract response values into suite-scoped or global environment variables for use by other contracts. · github.com, 5 Oct 2026
Intended users
The README describes a framework for testing live API endpoints against consumer-defined contracts. · github.com, 5 Oct 2026
License
The repository identifies its license as Apache-2.0. · github.com, 5 Oct 2026
Maker security
WSO2's security page lists ISO 27001:2022 certification and SOC 2 Type 2 compliance for the company, but does not specify coverage for this repository. · wso2.com, 5 Oct 2026
Notable limitation
The README lists XML path support as a todo. · github.com, 5 Oct 2026
Purpose
It is a consumer-based contract testing library that calls live REST API endpoints and compares their responses with predefined contract responses. · github.com, 5 Oct 2026
Suite setup
Suite configuration can run contracts before or after tests, and before-suite contracts run synchronously before suite tests. · github.com, 5 Oct 2026
TLS configuration
The example volume layout includes a certificate keystore and a client truststore. · github.com, 5 Oct 2026
Waits
A contract can specify a wait time in seconds to pause after its assertions finish. · github.com, 5 Oct 2026

Where WSO2 Contract Test Runner stands on Freedom251

Look at these too