1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Updated Flow testing (markdown)

YumaMatsuura 2019-04-01 16:50:43 +09:00
parent 0d798bfa14
commit f4fd52a535

@ -130,3 +130,26 @@ This flow testing feature should be turned on/off. Add a flag in settings.js. Th
# CLI
This flow testing needs to be run on the CLI for targeting to run automatically on Travis CI when receiving a pull request on GitHub.
When running a command like `grunt test-flow`, Node-RED runs flow testing then outputs each result such as the existing Mocha tests.
- Run flow test.
```
grunt test-flow --testItem="./item.json"
```
- Command line argument.
- --testItem : Specify the json file for which the test target "test-in node ID" and "Label" are set.
- Example: item.json
```
[
{
"id": "a9890736.34f478", // Test in node ID.
"labels": [ // Label specified for test in node.
"Test Case 01",
"Test Case 02"
]
}
]
```
- Target:
- Flow to be tested is `flow<hostname>.json` in user directory.