YAML-driven regression test runner for HTTP APIs, MCP servers, and shell commands
Project description
regrun
YAML-driven regression test runner for HTTP APIs, MCP servers, and shell commands.
Define your test cases declaratively in YAML files, then run them against live services with a single command.
Install
pip install regrun
Quick Start
# Run all tests in a directory
regrun run tests/regression/
# Filter by layer (setup auto-included)
regrun run tests/regression/ --layer api
# Dry run — show test plan without executing
regrun run tests/regression/ --dry-run
# JSON output with verbose logging
regrun run tests/regression/ --output json --verbose
CLI Reference
regrun run <test-dir> [OPTIONS]
| Option | Type | Default | Description |
|---|---|---|---|
--layer |
setup|api|mcp|chat |
all | Filter to one layer (setup auto-included unless --skip-setup) |
--group |
1,2,3 |
all | Comma-separated group IDs |
--priority |
high|medium|low |
all | Filter groups by priority |
--dry-run |
flag | false | Print test plan, do not execute |
--output |
text|json |
text |
Output format |
--verbose, -v |
flag | false | Log request/response bodies |
--fail-fast |
flag | false | Stop on first failure |
--skip-setup |
flag | false | Skip setup layer |
YAML Format
Each .yaml file in the test directory defines a set of test groups:
meta:
product: my-api
layer: api # setup | api | mcp | chat
runner: httpx # httpx | fastmcp | bash | websocket
endpoint: "http://localhost:8000"
default_auth: prod
variables:
RUN_ID: "{{timestamp}}" # Built-in: unix timestamp + 4 hex chars
auth:
prod:
type: bearer
token: "{{PROD_JWT}}"
org_header: "my-org"
groups:
- id: 1
name: "Health Check"
priority: high
tests:
- id: "T.1"
name: "GET /health"
method: GET
path: "/health"
auth: none
assert:
status: 200
Runners
- httpx — HTTP API tests (
method,path,body,query_params) - fastmcp — MCP tool calls via fastmcp CLI (
tool,args) - bash — Shell commands (
commandslist withcmdand optionalcapture) - websocket — Streaming WebSocket tests (
url,send,wait_for)
Assertion Operators
| Assertion | Scope | Example |
|---|---|---|
status |
HTTP status code | status: 200 or status: [200, 201] |
is_error |
MCP error flag | is_error: false |
has_error |
WebSocket error | has_error: false |
last_exit_code |
Bash exit code | last_exit_code: 0 |
contains |
Body substring | contains: "success" |
JSONPath operators (under json_path:):
exists, not_empty, equals, contains, gt, gte, lt, lte, starts_with, matches
Variable Capture
capture:
TASK_ID: "$.id" # JSONPath from response
RAW: stdout # Full stdout (bash only)
Captured variables propagate to all subsequent tests across files.
Environment Variables
| Variable | Default | Description |
|---|---|---|
REGRUN_API_ENDPOINT |
— | Override meta.endpoint in all files |
REGRUN_MCP_ENDPOINT |
— | Override meta.mcp_endpoint in all files |
REGRUN_TIMEOUT |
30 |
Per-test HTTP timeout (seconds) |
REGRUN_MCP_TIMEOUT |
60 |
Per-test MCP call timeout (seconds) |
REGRUN_WS_TIMEOUT |
30 |
Per-test WebSocket timeout (seconds) |
REGRUN_VERBOSE |
false |
Log request/response bodies |
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file regrun-0.1.0.tar.gz.
File metadata
- Download URL: regrun-0.1.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9df329016318e37a5e42b84142b7d7304775256ec6e68fa6aefa8e08c69b9fc2
|
|
| MD5 |
9797d24bcebe7a4796cdc0700f075cc9
|
|
| BLAKE2b-256 |
ced3d4b9f7a185f013a28fb31300493c82bf8b9f3b3d98388a6b14970adf1eeb
|
Provenance
The following attestation bundles were made for regrun-0.1.0.tar.gz:
Publisher:
publish.yml on daviunx/regrun
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
regrun-0.1.0.tar.gz -
Subject digest:
9df329016318e37a5e42b84142b7d7304775256ec6e68fa6aefa8e08c69b9fc2 - Sigstore transparency entry: 1749714324
- Sigstore integration time:
-
Permalink:
daviunx/regrun@6685d1b9f50677b6f916ead425eae4d47aaa50fb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/daviunx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6685d1b9f50677b6f916ead425eae4d47aaa50fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file regrun-0.1.0-py3-none-any.whl.
File metadata
- Download URL: regrun-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbafd32612d33430606e9fc21a5f83a4827d06f42f9cc93103bc882ce1a7ebf7
|
|
| MD5 |
f5cd088085f3b6c6fd6f87711157ff9a
|
|
| BLAKE2b-256 |
ad3e0d6952effe9e76992478ab764878001527f13a90960f93881203370f129a
|
Provenance
The following attestation bundles were made for regrun-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on daviunx/regrun
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
regrun-0.1.0-py3-none-any.whl -
Subject digest:
fbafd32612d33430606e9fc21a5f83a4827d06f42f9cc93103bc882ce1a7ebf7 - Sigstore transparency entry: 1749714456
- Sigstore integration time:
-
Permalink:
daviunx/regrun@6685d1b9f50677b6f916ead425eae4d47aaa50fb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/daviunx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6685d1b9f50677b6f916ead425eae4d47aaa50fb -
Trigger Event:
push
-
Statement type: