mercredi 24 octobre 2018

Python Built-in Self-Testing framework for Hardware Diagnosis

I am writing BIST (Built-in Self-Testing) suite for medical equipment maker.

The BIST tests are intended to be part of the deployed product and be executed in the field by the end user. The goal of these tests is diagnosis and reporting of various hardware failures.

The requirements are straightforward:

  • The suite should allow defining "sets" of tests and mange their execution (start / stop / pause).

  • A Pass / Fail reporting is to be generated upon completion.

  • Adding Tests should be allowed in the field and should be simple. (e.g. copy a test file into a Tests directory)

  • Tests should be written in Python.

The Tests themselves should implement some abstract base, something like:

  1. Declare the number of "Steps" the test consists of
  2. Implement Setup / Teardown functions
  3. Have a Pass / Fail result per step
  4. Write to a log
  5. Be started / stopped / aborted
  6. Throw specific exceptions (test may also fail)

After some Googling, I came to the conclusion that although there are lots of great testing libraries, all of them are aimed development-time verification. (e.g. TDD, acceptance testing, build automation etc.)

Still, I believe some of those libraries are generic enough and easily extendable and could therefore be adapted to my purpose. Robot Framework for example seems to have it all:

  • Generic enough (not being domain-specific, e.g. aimed at Web UI testing)
  • Actively developed and maintained and thoroughly documented
  • Written in Python
  • Very easy to extend with lots of example
  • Has a Runner module with a UI frontend
  • Apache 2 licensed (redistributable)

Question is Are there no test frameworks targeted at hardware diagnosis? If not, is a Framework like Robot Framework really the best option for my purpose?

Thanks!

Aucun commentaire:

Enregistrer un commentaire