Python framework to test hardware and control various equipment
How is Python used in test automation in embedded systems?
Which Python versions does OpenHTF support?
How is OpenHTF different from pytest?
Is OpenHTF still maintained?
Hi,
I am looking for a Python framework to test hardware (boards or multiple of boards) and control various equipment (scope, thermal chamber, power supplies, etc...) via VISA, SSH, modbus, serial for a long time of time (up to 7 days) of running. During this time, I would like to make calls to make adjustment to both DUT and equipment based on triggers or time (every 1, 2, 3 hours, etc..)
I have looked at:
OpenHTF (by Google) supported Python3.7
https://github.com/google/openhtf
Spintop OpenHTF (by Tackv, a spin branch off from Google) supported Python3.7
https://spintop-openhtf.readthedocs.io/en/latest/
FastAPI
https://fastapi.tiangolo.com/
Make a new framework and use Celery
https://docs.celeryq.dev/en/stable/getting-started/introduction.html
OpenHTF does not seem to have a way to continuously run the tests for a long period of time nor a way to make async to DUT/equipment. It is more like a manufacturer test to QC the product on the production line.
FastAPI seems to be good not sure if it can handle all the async call based on triggers/time. Celery seems to be quiet complex but it can trigger calls based on time.
For database storage, I will use influxdb/grafana for collecting/viewing data and postgres for storing DUT/equipment/test config/final test results. They will all be dockerized.
Do you have any suggestions/comments?
Thanks!
Long time since this question was asked.
Embedded Systems present special characterists to implement acceptance testing automation (one of the most important is that, most likely, the "Device Under Test" is not the same device as the one executing the test cases; hence same kind of interaction interface is required). This is not "excatly" the case when doing test automation of a Web Page or a PC Application or even when running unit testing of an embedded software (which can also be executed outside of the device). Based on this assumption, I think a framework which is developed for doing unit testing is not the best tool to develop an Emedded System Test Bench for performing acceptance tests.
At the moment we are facing a similar situation trying to choose a development environment to implement automation testing for an embedded device. We are looking into:
Robot Framework, which is a generic acceptance test automation framework based on keyword-driven testing approach.
FitNesse (http://www.fitnesse.org)
Pycopia
There are also other tools that don`t use Python. For example the ones described in this thread (MxVDev)
I think the Robot Framework is the right tool for you. You can split your tests in test-suites and if one test fails the next test will run.