Pages: [1]   Go Down
Author Topic: Arduino TestSuite: Automated Arduino Unit Tests  (Read 2286 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 2
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The last days, I have been working on my first Python program named: "arduino_testsuite"

GitHub project page:
Page in the Python Package Index:

This program allows automated running of several Arduino unit tests. The testing process is started on the PC but the tests run on the actual Arduino hardware. One set of unit tests is typically used to test one Arduino library.

Program flow:
The following steps are performed for each set of unit tests:
  • Read the config file to find out which tests to run
    • The script compiles and uploads an Arduino sketch that contains the unit testing code.
    • The unit tests are run on the Arduino board.
    • The results of the test are printed over the serial port and analyzed by the Python script.
  • The script starts the next test, repeating the above steps for all test that are requested in the configuration file.
  • The script prints a summary showing an overview of all the failed/passed tests in the complete testsuite.


Why is this useful:

Typical test output:

jeroen@computer:~/tests$ python -m arduino_testsuite
Planned tests:
 1. examples/floatingPin
 2. examples/inInterval
 3. examples/simpleTest
 4. examples/buildErrorTest
 5. examples/nonExistingFolder
 6. examples/slowTest
 7. examples/verySlowTest
.... output normally continues for a while ... link to full log below.

Full log in: (number of characters per post is limited)

Comments are more than welcome. (remember, this is my first Python program...)
« Last Edit: January 15, 2013, 09:06:19 am by doggenj » Logged

Global Moderator
Offline Offline
Shannon Member
Karma: 227
Posts: 14048
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Super you want to start with this, a few weeks ago I proposed it as a graduation project to someone on the forum who was searching for some project.


Rob Tillaart

Nederlandse sectie -,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Edison Member
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent project.

Pages: [1]   Go Up
Jump to: