Files
dut_pytest/README.md

77 lines
1.4 KiB
Markdown

# Hardware Test Framework Template
A reusable, Python-based testing framework designed for validating electronic hardware and DUTs. Built around `pytest`, this template supports serial, SCPI, and simulated devices, with structured output for automated test reporting.
---
## Features
- ✅ Pytest integration for structured and repeatable test execution
- ⚡ Interfaces with bench equipment via SCPI or serial
- 🔄 Optional simulator backend for offline development
- 📊 HTML and CSV test reports
- 🧩 Modular architecture: easy to extend for new instruments or DUTs
---
## Project Structure
src/
interfaces/ # Abstract communication backends (SCPI, Serial, Dummy)
instruments/ # Power supplies, eloads, DUT control logic
utils/ # Logging, timing, CSV writing
config/ # TOML/YAML config for sim/real hardware
tests/ # Pytest test cases
docs/ # Sphinx documentation
---
## Getting Started
# Set up venv (optional but recommended)
python -m venv .venv
source .venv/bin/activate
or
venv\Scripts\Activate.ps1 on Windows powershell
# Install dependencies
pip install -r requirements.txt
# Run tests
pytest
or
pytest --sim
---
## Documentation
To build HTML docs:
cd docs
make html
in windows:
cd docs
sphinx-build -b html . _build/html
Generated docs will be in docs/_build/html/index.html
---
## License
None
---
## Author
Nathan Corwin — nathan@corwin.life