-
-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit Testing for embedded #408
Comments
This is how I normally writes tests: https://github.com/eerimoq/simba/blob/master/tst/kernel/event/main.c. It is very basic and works very well for me. There are plenty of examples in the tst-folder in that repository. Then I build, upload and run on on target with This example run is on native linux. I don't have an Embedded device nearby. I can supply the output from that as well later.
|
@eerimoq could you provide test-output from AVR? |
Tonight, when I get home. I'll add output for Arduino Nano and Arduino Due. It's pretty much the same as the above though. Ideally, the output should be the same independently of what hardware it is executed on. Except cases where a device has too little memory and the whole test suite will not fit. |
@eerimoq I agree with you. Now need to decide how to implement it: write own UNIT Tests framework or use existing solutions, like @ThrowTheSwitch https://github.com/ThrowTheSwitch/Unity |
It's probably useful for many programmers to get the test framework generated when the create a project, but, also, I think platformio should provide a high level API that makes it possible to communicate with platformio with any test framework. |
Good. I'll wait output from AVR platform |
Here we go. Arduino Nano
Arduino Due
|
Another unit test framework for Arduino https://github.com/mmurdoch/arduinounit |
* develop: Fix incorrect line order when converting from INO to CPP and pointer is used Fix unit test Notify about `version` field when creating library Add support for SparkFun Blynk Board Return valid exit code from ``plaformio test`` command Disable SSL Server-Name-Indication for Python < 2.7.9 Version bump to 3.0.1 (issue #772) Disable temporary SSL for PlatformIO services // Resolve #772 Version bump to 3.0.0 (issues #770, #766, #747, #730, #765, #640, #659, #742, #459, #542, #763, #759, #753, #757, #749, #748, #745, #519, #709, #743, #413, #498, #410, #740, #361, #414, #554, #732, #588, #475, #461, #101, #719, #721, #537, #415, #522, #289, #556, #570, #456, #617, #432, #408, #479, #667, #510) Fix menu height for docs Fix issue with multiple archives when linking firmware Add migration guide for PIO2 to PIO3 Search libraries by headers/includes with ``platformio lib search --header`` option Update pio run command examples Add Unit Testing Demo Update PIO Plus badge title and link Add PlatformIO Plus badge Add links to PlatformIO Plus
The issue is an addition to #258. Requested by @Oaz, @kireevco.
How will it work? Nothing new here, general Unit testing design
test
folderpio test
PlatformIO will use each
test
as source code for the new project and the source code of existing project will be used as input library. The developer writes tests for the specific part of code, PlatformIO uploads it on-the-fly, tests, gathers results, shows reports to the developer.Comments are welcome.
The text was updated successfully, but these errors were encountered: