Why TestFlows

One library for writing test programs. Not just collecting tests for a runner.

Test programs

Control is yours. Branch, loop, and compose scenarios in Python. No plugin maze for basic dynamics. Your tests read like the program you meant to write.

Steps

Break behavior into named steps with clear results. Readable runs, easier debugging, reusable building blocks. Failures point to the step that broke, not a wall of assert noise.

Combinatorial

Cover combinations systematically. Explore parameter space without hand-writing every case. Pairwise and beyond, driven from the same test program model.

Parallel & Async

Scale out across processes for throughput, or go concurrent with async and await. Same scenario style either way. Keep the test program model when the suite grows.

Requirements

Treat requirements like code. Author them in Markdown, link them to tests, and produce coverage reports from the same workflow you already run.

Covering Arrays

Cut huge combination spaces down to pairwise or n-wise sets. Get strong coverage with far fewer cases than exhaustive enumeration.

And More...

Manual testing, documentation as code, professional reports, analytics, protocol modules, and the rest of the toolkit. Built for teams that outgrow checklist frameworks.

Everything is code

No scaffolding. Just Python.

Write

A test is just a Python program. Open a file and define a scenario. No special runner config, no scaffolding.

test.py

1
2
3
4
from testflows.core import Scenario

with Scenario("Hello TestFlows"):
pass

Run

Execute it like any other script. You get a clear pass, a scenario count, and a time. Then keep building.

terminal

$ python3 ./test.py
✔ [ OK ] /Hello TestFlows

1 scenario (1 ok)
Total time 2ms

Using test steps

Break the procedure into steps. Each step is a named result - easier to read, debug, and reuse.

test.py

1
2
3
4
5
6
7
8
9
10
11
12
from testflows.core import *

@TestScenario
def my_scenario(self):
with Given("I setup something"):
pass

with When("I do something"):
pass

with Then("I expect something"):
pass

Test output will show each step executing and its result.

terminal

Example output: Scenario my scenario with Given, When, and Then steps each reporting OK.

Structure

Improves how the procedure is written

Debug

Failures show which step broke

Document

Step names become the specification

Always learning

From the TestFlows blog.

Read the blog

Deep dives on test programs, steps, combinatorial coverage, behavior models, and more. Written for developers who ship tests for complex systems.

Read all posts

Ready to build better tests?

Join us on GitHub