Pages: [1]   Go Down
Author Topic: Automatic Testing Arduino Software  (Read 369 times)
0 Members and 1 Guest are viewing this topic.
Heemskerk, Netherlands
Offline Offline
Sr. Member
****
Karma: 10
Posts: 406
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In my work I regularly write Software that has quite a few complex logic steps in specific sequence order that change due to certain conditions. Testing this software is always a pain in the ..s. So I wrote a library that can simulate button presses/pin changes and capture pin output settings. The buttons are simulated by creating testcases in Excel and generating 3 files that are integrated into the Arduino sketch at compile time. Output (of the pins both INPUT and OUTPUT) are sent to Serial.
The testcases are stored in FLASH memory thus reducing RAM usage as that is usually the limiting factor. The testcases can alsow be delayed before becoming activated.

In some cases it is handy to add addtional output (like counters etc) in the serial output. So I added the ability to create  a user function that is called every time the Serial outputs pin data. The output is in CSV format allowing it to be copy & pasted into Excel again for formatting.

As the software is usually scanning the pins for input there is an option to block showing pin reads with a non relevant value. Thus reducing output making it more readable.
If your sketch is a timing critical one, this library will not help but if yours is more of a sequence logic type this  library allows for reproducing the same test cases again every time.

The current version is a preliminary one but is fully functional for digitalRead & digital Write. analogRead and analogWrite will be added in future.

Any suggestions are welcome.

You can find the library with a "blink" example at GITHUB: https://github.com/nicoverduin/AutoTest

For more info check www.verelec.nl

Let me know what you think.

Regards
Nico
« Last Edit: September 10, 2013, 12:58:03 am by nicoverduin » Logged

Pages: [1]   Go Up
Jump to: