WSO2 Contract Test Runner
WSO2 Contract Test Runner is an open-source library for checking live REST API endpoints against consumer-defined contracts.
What WSO2 Contract Test Runner is
WSO2 Contract Test Runner is an open-source library for checking live REST API endpoints against consumer-defined contracts. It sends requests to endpoints and compares their responses with expected responses described in JSON files. A contract can specify a request, expected response, assertions, and optional post-conditions. Supported checks include status codes, JSON body and header paths, exact values, regular expressions, empty values, structure, arrays, and objects. Suite configuration can schedule contracts before or after tests; those set to run before a suite execute synchronously before the suite tests. Post-conditions can extract response values into suite-scoped or global environment variables for other contracts. Contracts can also pause for a specified number of seconds after assertions finish. The documented workflow runs tests in Docker, using contract and configuration files placed in a mounted volume. The sample request uses bearer authorization and a cookie supplied through environment variables. The project is Apache-2.0 licensed and no paid plans are listed. XML path support is listed as a todo.
Good
- Open-source Apache-2.0 licensed library
- Checks live REST API endpoints
- Supports JSON assertions and post-conditions
- Can share extracted values through environment variables
Watch out
- XML path support is listed as a todo
- Contracts use JSON format
Who it suits
It suits teams checking live REST APIs against consumer-defined JSON contracts. The Docker workflow is relevant for users able to run tests in a mounted-volume setup.
Verdict
WSO2 Contract Test Runner provides contract-based checks for live REST endpoints, with configurable assertions and suite behavior. Its listed XML path gap matters if your contracts require XML checks.
Plans and prices
From WSO2 Contract Test Runner's own pricing page, checked 5 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Contract Test Runner | Free | Apache-2.0 licensed library · no paid plans listed |
The facts
Each one read from WSO2 Contract Test Runner's own pages, with the date it was checked.
What it does
- Assertions
- Supported checks include status codes, JSON body and header paths, exact values, regular expressions, emptiness, structure, arrays, and objects.checked 5 Oct 2026
- Authentication inputs
- The README's sample request uses bearer authorization and a cookie, with values supplied through environment variables.checked 5 Oct 2026
- Contract format
- Contracts are JSON files with request, expected response, assertions, and optional post-conditions.checked 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.checked 5 Oct 2026
- Environment variables
- Post-conditions can extract response values into suite-scoped or global environment variables for use by other contracts.checked 5 Oct 2026
- Intended users
- The README describes a framework for testing live API endpoints against consumer-defined contracts.checked 5 Oct 2026
- License
- The repository identifies its license as Apache-2.0.checked 5 Oct 2026
- Notable limitation
- The README lists XML path support as a todo.checked 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.checked 5 Oct 2026
- Suite setup
- Suite configuration can run contracts before or after tests, and before-suite contracts run synchronously before suite tests.checked 5 Oct 2026
- TLS configuration
- The example volume layout includes a certificate keystore and a client truststore.checked 5 Oct 2026
- Waits
- A contract can specify a wait time in seconds to pause after its assertions finish.checked 5 Oct 2026
The company
- 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.checked 5 Oct 2026
Alternatives to WSO2 Contract Test Runner
- 1

QUnit
Free planAndroidiOSWebAPI7.4Free plan - 2

Web Test Runner
Free planWebLinuxmacOSSelf-hosted6.9Free plan - 3

Cucumber.js
Free planLinuxmacOSSelf-hostedWindows6.8Free plan - 4
Karma
Free planAndroidiOSWebLinux6.7Free plan - 5

Vitest
Free planWebLinuxmacOSWindows6.6Free plan - 6
Jasmine
Free planWebLinuxmacOSWindows6.5Free plan
