-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Testing Arduino
This repository contains a number of automated tests, that can be used after making changes to verify that nothing has broken or been changed in unforeseen ways.
These tests live in the app/tests
directory and use the JUnit test framework (version 4). Some tests are silent and just test some Java code, while other tests actually start the Arduino IDE, opening up a window and manipulating it (using the "fest" library). When running these tests (i.e. when running all tests), you should probably leave your computer alone while the tests run, to prevent accidentally influencing the tests.
Note: Tests that manipulate the GUI do not seem to work on all systems reliably. In particular, it seems that Java 11, GUI scaling and multiple monitors might be causing problems in some cases (see #10168).
From the commandline, ant
can be used for running tests, just like building. For this, go into the build
directory and run the test
target:
build$ ant test
It is not currently possible to run a subset of tests from the commandline.
Some Java IDEs (e.g. Eclipse, NetBeans) integrate support for JUnit, the test framework. They should allow running (single) tests from within the IDE environment.