Skip to content

Repository files navigation

Jig

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.

python versions pytest versions license fork of HardPy


About this fork

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.

Overview

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.

jig panel

To Install

pip install pytest-jig

The 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

Getting Started

With CouchDB

  1. Create your first test bench.
jig init
  1. Launch CouchDB database via docker compose in the background.
cd tests
docker compose up -d
  1. Launch Jig operator panel.
jig run
  1. View operator panel in browser: http://localhost:8000/

  2. View the latest test report: http://localhost:5984/_utils

    Login and password: dev, database - runstore.

Without a database

  1. Create your first test bench.
jig init --no-create-database --storage-type json
  1. Launch Jig operator panel.
jig run
  1. View operator panel in browser: http://localhost:8000/

Examples

From a clone of this repository, any example in the examples folder can be started by name:

poetry install
poetry run example full_capabilities

The 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.

Measurement instruments

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.

About

Jig is a python library for creating a test bench for devices.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages