Strata-based pytest orchestration, suite manifests, and HTML reporting.
Project description
wn-rack
wn-rack is a packageable test runner built on top of pytest.
It adds a suite model around ordinary pytest tests:
- ordered strata such as
L0_foundationandL1_parsing - TOML manifests for suite and subtest metadata
- durable JSON result artifacts
- HTML reporting
- declared source-to-test traceability through
code_under_test - lightweight scaffolding for new strata and subtests
The distribution name is wn-rack. The CLI command is rack.
Install
pip install wn-rack
For local package development:
uv sync
uv run rack --help
What Rack Does
Rack does not replace pytest authoring. Tests stay as normal test_*.py
files. Rack adds:
rack.tomlfor suite-wide configurationSTRATUM.tomlfor per-stratum manifests- subtest tracking at the test-file level
- persisted results in
rack_results/ - suite status and inventory views
- HTML reports that merge execution data and manifest metadata
Quick Start
Minimal suite layout:
my_suite/
rack.toml
L0_foundation/
STRATUM.toml
test_L0_001_smoke.py
cases/
L1_parsing/
STRATUM.toml
test_L1_001_parser.py
cases/
Minimal rack.toml:
[rack]
name = "Example Suite"
version = "1.0"
description = "Example Rack suite"
[strata]
order = ["L0_foundation", "L1_parsing"]
default_enabled = ["L0_foundation", "L1_parsing"]
Minimal L0_foundation/STRATUM.toml:
name = "Foundation"
order = 0
description = "Low-level tests"
enabled = true
concerns = ["core"]
objectives = ["Verify the basic behavior works"]
[[subtests]]
file = "test_L0_001_smoke.py"
name = "Smoke"
description = "Basic smoke coverage"
test_case_type = "algorithmic"
[subtests.code_under_test]
module = "example_module"
[subtests.test_functions]
test_smoke = "Basic sanity check"
Minimal test file:
def test_smoke():
assert True
Run the suite:
rack run
rack status
rack report
Suite Resolution
Rack resolves the active suite root in this order:
RACK_TESTS_DIRWN_RACK_TESTS_DIR- nearest parent of the current working directory containing
rack.toml - current working directory
This supports both package-first usage and legacy wrapper scripts.
Main Commands
rack listrack runrack statusrack reportrack refreshrack inventoryrack new stratumrack new subtest
Examples:
rack run
rack run L0
rack run L5_001
rack run L5_001::test_name
rack list --concern svg.text
rack inventory --orphans
Result Artifacts
Rack writes output under <tests_dir>/rack_results/:
summary.jsonsource_hashes.jsonreport.htmlsubtests/*.jsonstrata/<stratum>.jsonstrata/<stratum>_pytest.jsonoutput/*.json
Python API
Rack exports:
RackOutputget_current_output()set_current_output()clear_current_output()
This is the structured-output side channel used by suites that want richer report data such as metrics, timings, comparisons, attachments, or SVG output.
See Python API.
Documentation
Current Behavior Notes
These are current implementation realities:
--allis parsed but does not yet override enabled filteringrack runcurrently accepts one positional target tokenrack statuscan suggest multiple short names in one command string even though the parser takes one positional targetvalidate_code_under_test()checkscode_under_test.moduledirectly, whilecmd_run()also supportsmodulesfor source-hash updates
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wn_rack-1.1.0.tar.gz.
File metadata
- Download URL: wn_rack-1.1.0.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f93191230921e0bd3f150b9d9bf9cba2a38cc0316f9fc5868bcc3d91049efe
|
|
| MD5 |
24a974ceda3e670bfbc7e33b13ad6be0
|
|
| BLAKE2b-256 |
aa32a019256f221264e484b00abe8b4d0735f8a33bd4e267f74a0a99af1b0233
|
File details
Details for the file wn_rack-1.1.0-py3-none-any.whl.
File metadata
- Download URL: wn_rack-1.1.0-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7157f8347266972d530fa5d5951ad60638d543295c3a1d7618cb5483625e58d8
|
|
| MD5 |
b204b9b27543cc1b4c1334272322bdee
|
|
| BLAKE2b-256 |
3ea759a70638d917e8ff343c7cc28c0511ddb12aff2ca6648dffe80ffcdd01c4
|