Python test benches for hardware, with an operator panel people enjoy using.
Write your tests with pytest, run them from the browser, and let the operator pick exactly the group of tests or features to execute.
Jig is a fork of HardPy focused on improving the user experience of running a test bench.
What the fork aims to add:
- A web GUI that organizes tests into categories, so an operator can run only a chosen group of tests or a set of features instead of the whole suite.
Everything documented below is inherited from HardPy and still applies.
Jig allows you to:
- Create test benches for devices using pytest;
- Use a browser to view, start, stop, and interact with tests;
- Store test results in the CouchDB database or to simple JSON files;
- Store test results on the StandCloud analytics platform.
pip install pytest-jigThe distribution is named pytest-jig; the import name and the CLI stay jig.
To install the unreleased main branch instead:
pip install git+https://github.com/Femtum/jig.git- Create your first test bench.
jig init- Launch CouchDB database via docker compose in the background.
cd tests
docker compose up -d- Launch Jig operator panel.
jig run-
View operator panel in browser: http://localhost:8000/
-
View the latest test report: http://localhost:5984/_utils
Login and password: dev, database - runstore.
- Create your first test bench.
jig init --no-create-database --storage-type json- Launch Jig operator panel.
jig run- View operator panel in browser: http://localhost:8000/
From a clone of this repository, any example in the examples folder can be started by name:
poetry install
poetry run example full_capabilitiesThe operator panel then runs on http://localhost:8000/. Running poetry run example
without a name lists what is available.
full_capabilities exercises every feature the panel can display and needs no database, which makes it the place to try out new ones.
For more examples of using Jig, see the documentation.
Jig does not contain any drivers for interacting with measuring equipment. However, Jig allows you to work with any Python code, meaning you can use open libraries to interact with measuring equipment.
