uvu vs WSO2 Contract Test Runner
uvu
github.comWSO2 Contract Test Runner
github.comSide by side
| Figure | uvu | WSO2 Contract Test Runner |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| Linux | — | Yes |
| Self-hosted | — | Yes |
| Plans published | 1 | 1 |
| Spec score · JavaScript Testing Frameworks | 7.6 (#11) | 7.1 (#19) |
| Assertions | The optional `uvu/assert` module works in Node.js and browser contexts, and the documentation says existing assertion libraries can be used instead. | Supported checks include status codes, JSON body and header paths, exact values, regular expressions, emptiness, structure, arrays, and objects. |
| Intended users | The project describes uvu as a test runner for Node.js and browser projects. | The README describes a framework for testing live API endpoints against consumer-defined contracts. |
| License | The repository identifies uvu as MIT licensed. | The repository identifies its license as Apache-2.0. |
| Purpose | uvu is a fast, lightweight test runner for Node.js and the browser. | It is a consumer-based contract testing library that calls live REST API endpoints and compares their responses with predefined contract responses. |
Plans
In their own words
uvu
uvu is a free, lightweight test runner for Node.js and browser projects. It supports individually executable test files, asynchronous tests that may return Promises, native ES modules and a familiar API. Tests can be grouped into named suites or registered through a simpler test interface, and snapshot testing is supported. Each file is self-contained and can also be run directly with Node.js. The optional CLI collects and executes suites, with options to stop after the first failure, ignore patterns, preload modules, set a working directory and colorize output. When a directory is specified, file matching takes a regular-expression pattern rather than relying on glob patterns. The optional assertion module works in browsers and can be swapped for another library, including Node.js’s native assert. Installation uses `npm install --save-dev uvu`. Package metadata specifies Node.js version `>=8`; the repository identifies the project as MIT licensed and credits Luke Edwards.
WSO2 Contract Test Runner
WSO2 Contract Test Runner is a free, Apache-2.0-licensed library for consumer-based testing of live REST API endpoints. It sends requests and compares returned data with expected responses defined in JSON contracts. A contract can include a request, expected response, assertions, and optional post-conditions. Assertions cover status codes, JSON body and header paths, exact values, regular expressions, emptiness, structures, arrays, and objects. Tests run through Docker by mounting contract and configuration files into the documented image workflow. Suites can run contracts before or after tests, with before-suite contracts running synchronously. Post-conditions can place extracted values into suite-scoped or global environment variables, and contracts can pause for a specified number of seconds. The sample setup uses bearer authorization, cookies, a certificate keystore, and a client truststore. XML path support is listed as a todo. Deployment is Linux and self-hosted.