tests/README.md
1 Running and creating tests {#running-and-creating-tests}
2 ==========================
3 
4 There are a number of tests included in RIOT. They are located in the
5 [tests folder](https://github.com/RIOT-OS/RIOT/tree/master/tests). These tests
6 allow basic functionality to be verified as well as provide an example of
7 usage.
8 
9 
10 Running automated tests
11 -----------------------
12 
13 Some tests can be performed automatically. The test automation scripts are
14 defined in the `<test_application>/tests/` folder. They are written in python
15 and interact through the uart with the test application code running on a
16 board to do the validation. It is recommended to flash the board with the
17 test just before running it because some platforms cannot be reset while
18 testing.
19 
20 From the test application directory run:
21 
22  BOARD=<board_of_your_choice> make flash test
23 
24 
25 An automated way of knowing if a test is available is to execute the
26 'test/available' target from the test application directory.
27 It executes without error if tests run by 'make test' are present.
28 
29  make test/available
30 
31 
32 Interaction through the uart
33 ----------------------------
34 
35 Tests implemented with `testrunner` use the `cleanterm` target that
36 provides an interaction without adding extra text output or input handling.
37 It can currently be expected to have unmodified line based interaction with the
38 board.
39 
40 The expected behavior is verified with the test in `tests/test_tools`.
41 
42 Tests cannot rely on having on all boards and terminal programs:
43 * unbuffered input
44 * allowing sending special characters like `ctrl+c/ctrl+d`