esp-open-rtos/tests
2016-10-25 14:50:37 +03:00
..
cases Add timers test case 2016-10-25 13:08:27 +03:00
fs-test@e531bc0d4f Moved spiff test to a test case. Reset retries in test runner 2016-10-24 21:47:29 +03:00
include Fix running dual test. Add basic wifi test 2016-10-24 19:44:22 +03:00
unity@bbf2fe3a93 Get testing system by projectgus working with master HEAD 2016-10-21 22:45:51 +03:00
Makefile Moved spiff test to a test case. Reset retries in test runner 2016-10-24 21:47:29 +03:00
README.md Update README.md 2016-10-25 14:50:37 +03:00
test_main.c Fix running dual test. Add basic wifi test 2016-10-24 19:44:22 +03:00
test_runner.py test_runner: List test cases and run individual test cases 2016-10-25 13:46:44 +03:00

esp-open-rtos tests

Testing is based on Unity C testing framework.

Features

  • Single device test case.
  • Dual devices test cases. Run test case on two ESP8266 modules simultaneously.
  • Run only specified test cases.
  • List available test cases on a device.

Usage

There's a test runner script test_runner.py written in Python3 that runs test cases on ESP8266 connected to a host.

Test runner is heavily relying on device reset using DTR and RTS signals. Popular ESP8266 boards such as NodeMcu and Wemos D1 support device reset into flash mode.

Options

--type or -t - Type of test case to run. Can be 'solo' or 'dual'. If not specified 'solo' test will be run.

--aport or -a - Serial port for device A. If not specified device /dev/ttyUSB0 is used.

--bport or -b - Serial port for device B. If not specified device /dev/ttyUSB1 is used.

--no-flash or -n - Do not flash the test firmware before running tests.

--list or -l - Display list of the available test cases on the device.

Example

Build test firmware, flash it using serial device /dev/tty.wchusbserial1410 and run only solo test cases:

./test_runner.py -a /dev/tty.wchusbserial1410

Build test firmware. Flash both devices as -t dual is specified. And run both solo and dual test cases:

./test_runner.py -a /dev/tty.wchusbserial1410 -b /dev/tty.wchusbserial1420 -t dual

Do not flash the firmware, only display available test cases on the device:

./test_runner.py -a /dev/tty.wchusbserial1410 -n -l

Do not flash the firmware and run only 2 and 4 test cases:

./test_runner.py -a /dev/tty.wchusbserial1410 -n 2 4

References

Unity - Simple Unit Testing for C