As you all know, Greentea test binaries contain whole testcase and rarely needs anything from external systems.
All external tools and commands like mbed test
, htrun
and mbedgt
are just used to start this test binary and to parse result from serial port.
However, most of the testcases do not require any communication from host, and you are therefore capable of running those tests manually.
To do so:
- Build the test binary with
mbed test --compile
- Flash the test binary to board
- Open serial terminal
- Copy&paste following string:
{{__sync;1}}
Output of running Mbed OS WiFi test manually looks like this:
mbedmbedmbedmbedmbedmbedmbedmbed
{{__sync;1}}
{{__version;1.3.0}}
{{__timeout;240}}
{{__host_test_name;default_auto}}
>>> Running 16 test cases...
{{__testcase_name;WIFI-CONSTRUCTOR}}
{{__testcase_name;WIFI-CONNECT-NOCREDENTIALS}}
{{__testcase_name;WIFI-SET-CREDENTIAL}}
{{__testcase_name;WIFI-SET-CHANNEL}}
{{__testcase_name;WIFI-GET-RSSI}}
{{__testcase_name;WIFI-CONNECT-PARAMS-NULL}}
{{__testcase_name;WIFI-CONNECT-PARAMS-VALID-UNSECURE}}
{{__testcase_name;WIFI-CONNECT-PARAMS-VALID-SECURE}}
{{__testcase_name;WIFI-CONNECT-PARAMS-CHANNEL}}
{{__testcase_name;WIFI-CONNECT-PARAMS-CHANNEL-FAIL}}
{{__testcase_name;WIFI-CONNECT}}
{{__testcase_name;WIFI-CONNECT-SECURE}}
{{__testcase_name;WIFI-CONNECT-SECURE-FAIL}}
{{__testcase_name;WIFI-CONNECT-DISCONNECT-REPEAT}}
{{__testcase_name;WIFI-SCAN-NULL}}
{{__testcase_name;WIFI-SCAN}}
>>> Running case #1: 'WIFI-CONSTRUCTOR'...
{{__testcase_start;WIFI-CONSTRUCTOR}}
...
{{__testcase_finish;WIFI-SET-CREDENTIAL;1;0}}
>>> 'WIFI-SET-CREDENTIAL': 1 passed, 0 failed
...
As you can see, it is very much human readable format, so you can use this method to run & debug without using command line tools to start the testcase.