Skip to content

Home

stepline – Step by step. Line by line. stepline – Step by step. Line by line.

stepline is a pytest companion library for structured, readable tests: steps that show what a test does, typed assertions that say what went wrong, and test documentation that lives right next to the code.

Early development

stepline is in alpha. Most features are still being built, and APIs may change between releases. The roadmap shows what is coming next.

Get started View on GitHub

Why stepline?

A failing test should tell you three things without opening the code: what the test was doing, where it stopped, and why it failed. Plain pytest gives you a traceback and an assert expression. stepline adds the missing structure around them.

  • Steps


    Split a test into named steps, as a context manager or a decorator, and see exactly which step failed.

  • Typed assertions


    Fluent assert_that(...) checks with type-aware methods and failure messages that explain the difference.

  • Test metadata


    Describe tests and link issues with decorators, then export a test specification without running a single test.

  • Console output


    Modern, rich-based output of steps and results, readable in your terminal and in CI logs.

  • Performance


    Measure how long steps and tests take, and check them against limits.

  • pytest plugin


    Installs as a regular pytest plugin and works with your existing setup and fixtures.

How it fits together

stepline does not replace pytest. It plugs into it and adds structure on top of the tests you already write:

flowchart LR
    T["Your tests"] --> P["pytest"]
    P --> S["stepline plugin"]
    S --> C["Console output"]
    S --> R["Test specification"]
    CLI["stepline CLI"] --> R
What is available today?

stepline is built step by step, and each milestone ships as a release. Right now the package provides:

  • the pytest plugin, which registers itself and shows a stepline line in the test session header;
  • the command-line tool with stepline --version;
  • typed assertions with assert_that, the generic checks and readable failure messages. They come with the upcoming release 0.1.0.

Steps, metadata and the rest follow in the next releases. See the changelog for what changed in each version.

Project status

Area Where to look
Releases on PyPI pytest-stepline
Changes per version Changelog
What comes next Roadmap (milestones)
Source code xKabbe/stepline