Skip to main content

HardPy library for device testing

Project description

HardPy

HardPy

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


Documentation: https://everypinio.github.io/hardpy/

Source Code: https://github.com/everypinio/hardpy

PyPi: https://pypi.org/project/hardpy/


Overview

HardPy allows you to:

  • Create test benches for devices using pytest;
  • Use a browser to view, run, and stop tests;
  • Store test results in the CouchDB database.

To Install

pip3 install hardpy

Examples

Find examples of using the HardPy in the examples folder.

Getting Started

CouchDB

This is a simple instruction for Linux. For Windows, follow the instructions from the documentation.

Launch CouchDB with Docker. Create couchdb.ini file:

[chttpd]
enable_cors=true

[cors]
origins = *
methods = GET, PUT, POST, HEAD, DELETE
credentials = true
headers = accept, authorization, content-type, origin, referer, x-csrf-token

Run the Docker container from folder with couchdb.ini file:

docker run --rm --name couchdb -p 5984:5984 -e COUCHDB_USER=dev -e COUCHDB_PASSWORD=dev -v ./couchdb.ini:/opt/couchdb/etc/local.ini couchdb:3.3

Test steps

Add simple test to tests folder

# test_1.py
import pytest

def test_one():
    assert True

Operator panel

Launch hardpy-panel from tests folder or launch hardpy-panel tests and open page http://localhost:8000/ in browser.

hardpy operator panel

Test report

The last test report is stored in runstore database, document - current. You can view the CouchDB instance through Fauxton web interface: http://localhost:5984/_utils

hardpy runstore

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hardpy-0.2.0.tar.gz (2.8 MB view hashes)

Uploaded Source

Built Distribution

hardpy-0.2.0-py3-none-any.whl (2.8 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page