пятница, 20 сентября 2019 г.

Running hybrid approach to testing on an embedded target

You might be one of those software engineers who love to be Agile, use BDD or TDD. Then you are aware how important the choice of the testing framework is. E.g. Busted for Lua is a very good and feature-rich BDD framework.
On the other hand, running a heavy framework on a small MCU with as little as 80 KB of RAM may be a challenge. So how to satisfy the two contradictory desires? Let's see:



One approach I suggest is using RPC mechanism. Then you can use any framework and any software you want on your PC and make MCU jobs remotely using RPC. The RPC can work on top of TCP/IP over Wi-Fi or using serial line.
The proof of concept can be found here: README-NodeMCU.md .
This is using Tango RPC module for Lua which runs good even on a tiny ESP8266 with NodeMCU firmware. On the PC side you can have the Tango client and any Lua software you like including Busted.
Have fun!


PIC:
digraph G {
    rankdir=LR
    node [shape=rect]
    "MCU
NodeMCU
RPC server" ->
"PC
RPC client"
[ dir=back, label="TCP/IP over Wi-Fi" ]
}

Комментариев нет:

Отправить комментарий