~/testml / examplesReal tests. Five runtimes. One file.
Every example here is a working .tml file. Copy it. Save it next to your code. Run it in Python, JavaScript, Ruby, Perl or Java. The same lines pass on every stack.
FormatYAML-style .tml
Runtimes5 first-class
LicenseMIT, open source
Lock-inNone. Ever.
Filter byHTTPDatabaseCLISnapshotAsync eventsSchema matchFixturesRegex assertions
/examples/recipesFour recipes you can lift today
Each card is a real .tml file. Each one runs the same on every supported stack. No mocks. No glue code. Just YAML and clear pass results.
tests/api/login.tmlPass
# HTTP login flow — runs in 5 languages
test: "Login returns a session token"
when:
POST: "/api/login"
body: { email: "dev@testml.org" }
then:
status: 200
json.session: "/^sess_[a-z0-9]{16}$/"
tests/db/orders_fixture.tmlPass
# Database fixture round-trip
fixture: "orders/seed.sql"
test: "Active orders are billed"
when:
sql: "SELECT count(*) FROM orders WHERE paid"
then:
rows[0].count: 42
duration_ms: < 50
tests/cli/build_snapshot.tmlPass
# CLI golden snapshot
test: "build --json prints a stable tree"
when:
shell: "./bin/build --json"
then:
exit: 0
stdout.json: "@snapshot:./golden/build.json"
tests/events/checkout_emit.tmlPass
# Async event payload shape
test: "checkout emits order.paid"
when:
call: "app.checkout(cart_id=1)"
then:
events:
- type: "order.paid"
payload.amount: 1999
payload.cart_id: 1
/one-file-many-runtimesOne file. Five runtimes. Zero copies.
Each .tml file is the source of truth. No language port. No mirror suite. Run the same lines from any host. Drop the duplication and the drift.
- Single test file across Python, JS, Ruby, Perl and Java.
- Plain YAML shape — no new query language to learn.
- Native exit codes for clean CI gates.
- JUnit XML report works in any pipeline.
- Open MIT licence. Fork it. Ship it.
terminal·5 runtimes
$ python -m testml tests/api/login.tml
✓ Login returns a session token (84ms)
$ node testml.js tests/api/login.tml
✓ Login returns a session token (78ms)
$ ruby testml.rb tests/api/login.tml
✓ Login returns a session token (102ms)
$ perl testml.pl tests/api/login.tml
✓ Login returns a session token (95ms)
$ java -jar testml.jar tests/api/login.tml
✓ Login returns a session token (112ms)
5/5 runtimes pass · same file · no edits
/install/by-runtimePick your stack. Then run the same .tml.
Install once for the runtime you live in. No new SDK. No paid tier. The command below is all you need to start.
pyPython
pip install testml
/process/4-stepsFrom copied snippet to passing CI in four steps
No setup ceremony. No vendor onboarding. Each step takes minutes, not days. Most teams have their first green test the same hour.
- STEP 01
Pick an example
Open the .tml file. Read the test block. The shape is plain YAML. Nothing else to learn.
- STEP 02
Drop it into your repo
Save it next to your code. Use any folder name. TestML walks the tree and finds it.
- STEP 03
Run with your runtime
Call testml from Python, Node, Ruby, Perl or Java. The same file passes in all of them.
- STEP 04
Wire it into CI
Each runtime exits with a clean code. Pipe the report to JUnit XML. CI dashboards just work.
Start with one example. Ship the rest.
Pick any .tml above. Drop it into your repo. Run it in your stack. The same lines pass on every runtime — no port, no mock, no drift.