Skip to main content

testless

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 LLM usage: $0.6101 (11 commits)
  • 👤 Human dev: ~$700 (7.0h @ $100/h, 30min dedup)

Generated on 2026-07-06 using openrouter/qwen/qwen3-coder-next


testless is a Python package that sits as an analytical layer on top of your existing test suite. It analyses test value, coverage overlap, duplication, and missing gaps, then generates LLM-ready planfile tickets that describe exactly what to remove, refactor, or add.


Features

Command What it does
testless scan Run pytest with --cov-context=test and collect metadata
testless duplicates Detect duplicate tests (coverage + AST + fixture overlap)
testless missing Suggest smoke, e2e, contract, and TestQL tests
testless planfiles Generate YAML planfile tickets for an LLM
testless doctor Answer questions: "what to remove?", "what to add?"

Quick Start

pip install testless
# or with uv:
uv add --dev testless

# 1. Scan your project
testless scan

# 2. Find duplicate tests (threshold: 85 % similarity)
testless duplicates --min-overlap 0.85

# 3. Find missing smoke / service / e2e tests
testless missing --services src/myapp

# 4. Generate LLM planfiles
testless planfiles --out .planfiles/ --with-prompts

# 5. Ask doctor questions
testless doctor "which tests should I remove?"

Configuration

Create a .testless.yml in your project root:

packages:
  - myapp

test_dirs:
  - tests

min_duplicate_score: 0.85
planfiles_dir: .planfiles
coverage_dir: .coverage_data

pytest_args:
  - --tb=short

Planfile format

Each generated ticket is a self-contained YAML file that an LLM can act on:

version: "1"
kind: duplicate
id: "DUP-3A7F2C"
title: "Remove duplicate test: test_health_ok vs test_health_status_200"
goal: "Reduce test suite redundancy without losing unique coverage"
context:
  test_a: tests/api/test_health.py::test_health_ok
  test_b: tests/api/test_health.py::test_health_status_200
evidence:
  - description: "score=0.93, coverage_overlap=0.95"
    score: 0.93
impact:
  risk: low
  expected_gains:
    - shorter test run time
    - reduced maintenance burden
tasks:
  - description: Compare test_health_ok and test_health_status_200 manually
  - description: Remove the weaker/less descriptive test
  - description: Run suite and verify no coverage regression
acceptance_criteria:
  - No decrease in unique line coverage
  - All remaining tests pass
llm_hints:
  style: minimal change
  safe_refactor: true

Architecture

src/testless/
├── cli.py                  # Click CLI
├── config.py               # .testless.yml loader
├── models/
│   ├── planfile.py         # Pydantic Planfile model
│   ├── findings.py         # Finding models
│   └── coverage_map.py     # CoverageMap model
├── collect/
│   ├── pytest_runner.py    # Run pytest, collect metadata
│   ├── coverage_loader.py  # Parse coverage.json contexts
│   ├── fixture_index.py    # AST-based fixture indexer
│   └── endpoint_inventory.py  # HTTP endpoint/service scanner
├── analyze/
│   ├── duplicate_tests.py  # Duplicate detection
│   ├── dead_tests.py       # Dead test detection
│   ├── missing_tests.py    # Missing test suggestions
│   ├── service_risk.py     # Service risk scoring
│   └── refactor_candidates.py  # Refactor detection
├── suggest/
│   ├── smoke.py            # Smoke test templates
│   ├── e2e.py              # E2E test templates
│   ├── service_tests.py    # Service contract templates
│   └── testql.py           # TestQL stub generator
├── tickets/
│   ├── builder.py          # Build Planfile from findings
│   ├── serializer.py       # Write planfiles to disk
│   └── prompts.py          # Attach LLM prompts
└── reporters/
    ├── console.py          # Coloured terminal output
    ├── markdown.py         # Markdown report
    └── json.py             # JSON report

License

Licensed under Apache-2.0.

Metadata

Release files for testless 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for testless 0.1.9
File Size Uploaded Provenance Actions
testless-0.1.9.tar.gz 40.3 kB Without provenance Details for testless-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for testless 0.1.9
File Interpreter ABI Platform Actions
testless-0.1.9-py3-none-any.whl Python 3 none any Details for testless-0.1.9-py3-none-any.whl

Total release size: 79.1 kB

Release files / testless-0.1.9.tar.gz

Download URL testless-0.1.9.tar.gz
Size 40.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3ab790d7c21c897a885bfb68168c3610d6fac38150411a46bf41a2fa64a91e12
BLAKE2b-256 checksum
How to use checksums
ff2a8bc948bcbaa30b6ab0416f9365da6c65cf9ac7d2ed945683117bd7bc835b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / testless-0.1.9-py3-none-any.whl

Download URL testless-0.1.9-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
554eef3e2f1f17f8e88e400e075906282138d6745d8777cc3ee904bc9c4bd772
BLAKE2b-256 checksum
How to use checksums
5b4acd626a098c0f275db508a337f7c9095468ed2412426a63d5344c7a7d5a0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Security for testless 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page