Robot Framework for hardware testing

Python is getting more and more popular for testing embedded hardware devices. These use cases requires the control of of external signal generators and measurement devices. Libraries for accessing this kind of equipment would be very useful. Also more advanced user dialogs could be useful for testing. Are there others around using the Robot Framework for hardware testing?

I don’t personally have experience from this, but I know RF is used a lot for testing embedded devices. There have been some RoboCon talks related to that you ought to be able to find via robocon.io.

Dear Pekka,

thanks a lot for your answer.

I have at the moment one small project ongoing to find out if RF is suitable or not. We looked into Pytest, RF and start from scratch. At the moment it looks like the fastest way is to use Python without using any test framework from the software domain.

Wish you a nice summer up in Finland,

Ernst

Hi Ernst,

What python does really well is providing many many modules for doing many many things including interfacing with hardware

What python doesn’t do well (but better than some other programming languages (C programmer here :raised_hand_with_fingers_splayed:)) is readability to non coders and test reporting (something that Robot Framework does exceptionally well in my opinion)

So I would suggest you consider a more hybrid approach, since you are prepared to go down the path of writing python code anyway, write the python code as a library of generic keywords for Robot Framework, then you can have the best of both worlds.

Just food for thought,

Dave.

Hi Dave,

thanks a lot for your thoughts concerning my hardware testing question. Until for some few days ago I believe a hybrid approach would be the best solution too, reusing the RF report and the SSHLibrary for communication to the embedded Linux target.

We started the programming of two competing prototypes, one based on RF and own Python libraries and a second using exclusively Python programming.

After seeing the progress of our Python programmer I changed my mind. He had generated HTML and pdf reports using some existing libraries. He had also added tables for measurement data and embedded nice graphical plots.

The SSHLibrary is very useful for testing Linux targets. We will now reuse this code and give it a Python interface.

The third advantage of RF is the human readable Robot files. To solve this problem we used some Python dictionaries storing all relevant data for the tests and exported this into a JSON string. This JSON sting is used to control the test sequencer.

The only missing part now is the graphical user interface. For this part we don’t have a prototype yet, but we have a concept for it. It is reading the JSON sting and populates all graphical objects automatically according to the test specification. Probably we will program this part in Python too. We need to maintain the code for +20 years so maintainability is very important.

If we make something useful out this we will probably make it open source.

Ernst

1 Like

Hi Ernest,

I’m developing some libraries to manipulate ADP3450 from digilent to automate some hardware tests here, I also worked in a library to manipulate the TI debugger to make some on-target testing on DSP.

I’ll come back here later to explain it better.

2 Likes