Use Node.js in your end devices(QQ: 796448809)
Depend on the purpose of the test case (whether it’s a positive or negative one), place it under test/run_pass
or test/run_fail
directory. The required external resources should be placed into test/resources
.
All test case files must be named in the following form test_<module name>[_<functionallity].js
where <module name>
should match one of the JS modules name in the IoT.js. If there is a test case which can not tied to a
module (like some js features) then the iotjs
name can be used as module name. It is important to
correctly specify the module name as the test executor relies on that information.
When you build iotjs
binary successfully, you can run test driver with this binary.
/path/to/iotjs tools/check_test.js
Some basic options are provided.
Existing test options are listed as follows;
start-from
quiet=yes|no (default is yes)
output-file
skip-module
output-coverage=yes|no (default is no)
experimental=yes|no (default is no)
To give options, please use two dashes ‘–’ once before the option name as described in the following sections.
Options that may need explanations.
build/x86_64-linux/debug/bin/iotjs tools/check_test.js -- start-from=test_console.js quiet=no