Emmbedded QA Automation

Hi we have IoT devices containing Cortex M3 Architecture microcontroller (NRF52). It includes various peripherals. Can its automation be done using Robot Framework. As of my current understanding of the robot framework I thing I need raspberry pi that support the robot framework and I have to connect our device with the raspberry pi. If so how can I connect our device with the raspberry pi to continue automated testing using robot framework.
Also if their is any manual or guidance available related to it kindly share it with me it will be of great help and it will be thankful to you.

Hi @Mudassir_Ahmed_Khan,

Without knowing exactly what you are wanting to test, I would say the answer is probably.

I have successfully run Robot Framework SeleniumLibrary test cases on a Allwinner H3 (Corex A7) based SOC board (Orange Pi Lite), running Armbian.

Robot Framework itself only requires python, so if your device can run python then you can probably run Robot Framework.

Then it’ll come down to what you want to test, you mentioned testing various peripherals, how are these connected? USB, I2C, SPI? there should be python modules that can connect to your peripherals via one of these protocols so you will probably want to identify those first.

I am not aware of any Robot Framework libraries for connecting to devices via I2C or SPI, so you will probably have to write some python keywords to interact with your peripherals, but once you have written them you can call them in various sequences and with different data from Robot Framework to test your peripherals.

I don’t know of any thing written specifically for the ARM platform, as I mentioned as long as your device and it’s OS can run a recent version of python, installing robot framework and various libraries is exactly the same as it is on any other platform, everything is installed via pip, most of the libraries are written in pure python and so should work.

  • What OS is your device running?
  • does you device have python installed? which version?
  • does you device have python pip installed?

Hopefully this will help you get started, feel free to ask more specific questions and I’ll try to help.


Hi @damies13 thanks for your response and extremely sorry for my late reply to you. Actually the OS or microcontroller (NRF52 supporting cortex M3 architecture) with which our device is working on is the simple microcontroller with C/C++ it does not support python.
Attached below is the link of this OS / microcontroller. Also further is it possible if I can have a call with you for 5 minutes so that I can resolve my concern that would be great and I will be extremely thankful to you.
Also by peripheral I means actually I want to test the code which I have written in C/C++ is it working Ok. Like For example in order to measure the readings of the accelerometer, Temperature sensor, etc also some of the formulae or condition testing and feature testing if they are working Ok.

Hi @Mudassir_Ahmed_Khan,

You mentioned:

Q1. Are using a serial connection on the raspberry pi to connect to your microcontroller? (e.g. you run minicom on the raspberry pi)

Q2. What os is running on the raspberry pi? Raspbian?

Idea: Serial console connection

If you are running Raspbian on the raspberry pi, then there is hope, Raspbian should support python and so you should be able to run robot framework there to run your tests.

It’s a bit messy, but there appears to be a serial library for robot framework, from my searching I found three links:

  • pip package appears to be version 0.2.0, the links to the source on github don’t work though
  • XiphosSystemsCorp on github appears to the original version 0.0.1 and unmaintained
  • whosaysni on github appears to be a newer forked version 0.4.2, this looks to have been maintained recently.

So with one of those robotframework-serial libraries, you should be able to send commands to your microcontroller from your raspberry pi using the serial console (exactly the same as you would with minicom), and then read back the response on the serial console.

Start by building a couple of keywords that send a single command and test it’s response, then if that works well you can the expand your keyword collection to increase your test coverage.

Idea 2: network connection

If you can connect to your microcontroller via a network connection there are some other libraries that might be useful:

I guess this depends if the microcontroller has a network (wifi?) interface, but as you said you need to connect to the raspberry pi first, i’m guessing this is not the case, which is why I put these second.

Idea 3: something completely custom

Robot Framework can execute python or even the operating system command line directly, so you can construct keywords that execute, with these you can get Robot Framework to run any command you can run on the rasberry pi and have Robot Framework check the result

Additionally you can write keywords in pure python so anything you can do in python you can do in Robot Framework

Hopefully something here helps,


Hi thanks for your response I think serial console connection would be better for small iot applications. I for now did not completely know if it works with our device but I will try and tell you what are the results.

Hi @damies13 Further digging down in idea 1 can you let me know which type of command (Are they AT commands or something else etc) I will be able to sent using serial console connection to the microcontroller. How will they benefit me in testing the device and its features.
Waiting for your response thanks for helping me a lot.

Hi @Mudassir_Ahmed_Khan,

I’m not that familiar with that library, i’ve not actually used it, I just saw it a while ago and thought to myself, that might be useful so remembered it existed.

From reviewing the code for that library it looks like it just sends raw text or encoded strings if you set an encoding, so i expect you should be able to send at commends.

I guess to answer this, how do you test the device manually?

  • If you are using a serial terminal (like minicom) to send at commands then this library should let you send the same things and get the same responses and then test that you got the expected response.
  • if you testing your device with a gui tool that your devs have provided then we might need a different approach.