Skip to main content

A pytest plugin and CLI tool for managing plain-text test cases with markdown documentation

Project description

plaintest

A pytest plugin and CLI tool for managing plain-text test cases with markdown documentation.

Overview

plaintest helps you bridge the gap between human-readable test case documentation and automated tests. Write your test cases in simple markdown files, link them to pytest tests using decorators, and generate beautiful HTML reports showing test coverage and results.

Rationale

Many teams struggle with test documentation scattered across multiple systems: requirements in Jira, test cases in TestRail, implementation details in code comments. This fragmentation makes it hard to understand what's being tested and why. By keeping test cases as markdown files in your repository alongside your code, you maintain a single source of truth that's version-controlled, code-review friendly, and easily accessible to both humans and LLMs.

Changes to test specifications go through the same PR process as code changes, ensuring consistency and traceability.

Installation

pip install plaintest

Or with uv:

uv add plaintest

Quick Start

  1. Initialize your test cases directory:
plaintest init
  1. Create a test case:
plaintest add "User login functionality"

This creates a markdown file like test-cases/001/case.md:

---
title: User login functionality
tags: []
---

## Steps


## Expected
  1. Link a pytest test to the test case:
import pytest

@pytest.mark.tc("001")
def test_user_login():
    # Your test implementation
    assert True
  1. Generate a coverage report:
plaintest report

Configuration

Add configuration to your pyproject.toml:

[tool.plaintest]
test_cases_dir = "test-cases"

Commands

  • plaintest init - Initialize test cases directory
  • plaintest add [TITLE] - Interactively add new test case(s)
  • plaintest report - Generate terminal-based coverage report
  • plaintest html-report - Generate side-by-side HTML report

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

plaintest-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plaintest-0.1.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file plaintest-0.1.0.tar.gz.

File metadata

  • Download URL: plaintest-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for plaintest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68d7acad29d7875ff726efa3f80dc49dbee64c8edc4bebacb416bd97475da202
MD5 249371cb04b74b1438dc4378658d282f
BLAKE2b-256 0982065b7c73902a52661236a9184a86b6b5751c0b33471fe07dd9d830e58125

See more details on using hashes here.

Provenance

The following attestation bundles were made for plaintest-0.1.0.tar.gz:

Publisher: python-publish.yml on ericgazoni/plaintest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plaintest-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: plaintest-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for plaintest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00aabb610064054941e36e08dcfdc1bdb15e7a856a2f9163aa2588a27b88a468
MD5 b1973c87982c610a65ecd5aac295d7c1
BLAKE2b-256 71703c274183362dc3a59b5537a4ae64d2fab2fd1180cbf4a230b6cf509d524d

See more details on using hashes here.

Provenance

The following attestation bundles were made for plaintest-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on ericgazoni/plaintest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page