Refactor: rename SimDUT, restructure DUT simulation and test flow

This commit is contained in:
2025-07-21 15:57:15 -06:00
parent 27064417dd
commit 4a1f943126
28 changed files with 750 additions and 5 deletions

View File

@@ -0,0 +1,76 @@
# 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
MIT
---
## Author
Nathan Corwin — nathan@corwin.life