Refactor: rename SimDUT, restructure DUT simulation and test flow
This commit is contained in:
76
README.md
76
README.md
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user