-
Notifications
You must be signed in to change notification settings - Fork 1
Handow APIs And Commands
jian edited this page Jul 14, 2021
·
3 revisions
Assuming you have cloned the handow project, created a main test application and installed local handow project as a Node.js module, then you can try Handow CLI and APIs.
Run local handow sorce code as a module in a main application
Run commands in the root path of the main test application.
You can run handow with NPM scripts. There are some tasks defined in the package.json already, you can add more. Run demo commands with NPM
You can also use package runner npx run Handow CLI, for example:
# Output handow help
$ npx handow --help
# Ran a plan
$ npx handow --plan project/TestPlan
The _handow.js is the APIs factory.
- buildStep(string stepsPath) - build all .step.js files and integrate all step function to the bundle files.
- parseStories(string storiesPath) - parse one specific story or all stories in specific folder, the .json story objects are generated in same path.
- buildTree(object plan) - Build a plan to a graphic tree, the [plan].tree.json file is generated.
- runStory(string storyPath) - Run a story by specify its full path, report is generated.
- runPlan(string planPath) - Run a plan by specify its full path, report is generated.
- stop() - Force quit handow running, no report generated.
For example:
const handow = require('handow');
const fooPlan = `${__dirname}/project/plan/myPlan`;
await handow.runPlan(fooPlan);
©2021 Handow
Supported by Handow team [email protected]