SwiftTest is a small, production-ready CLI wrapper around pytest that improves terminal UX with a clean summary and cached slow-test reporting.
- Python 3.11+
- A local virtual environment at
.venv
- Python 3.11+
- pytest
- pytest-json-report
- rich
- setuptools
- ruff
- mypy
python3 -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install -e ".[dev]"For editable local development:
python -m pip install -e ".[dev]"When working on this project, prefer the local virtual environment:
.venv/bin/python -m pip install -e ".[dev]"Run tests and cache the latest report:
swifttest runPass extra arguments through to pytest:
swifttest run -- -q tests/test_parser.pyGenerate a mixed demo report with passed, failed, skipped, and errored tests:
swifttest run -- demo_testsShow the last saved summary without rerunning tests:
swifttest summaryShow the slowest tests from the last saved report:
swifttest slowShow more slow tests:
swifttest slow --top 10After running the demo suite above, swifttest summary will show all summary columns with data, and
swifttest slow will list the slowest demo tests by their recorded setup/call/teardown durations.
Run the quality checks from the local virtual environment:
.venv/bin/python -m pytest
.venv/bin/python -m ruff check .
.venv/bin/python -m mypy src testsSwiftTest stores the latest pytest JSON report at:
.swifttest/latest-report.json