Hooks
Learn how to use onFlowStart and onFlowComplete hooks for setup and cleanup automation.
Types of Hooks
Hook
When it runs
Ideal Use Case
# flow.yaml
appId: my.app
onFlowStart:
- runFlow: setup.yaml
- runScript: setup.js
- <any other command>
onFlowComplete:
- runFlow: teardown.yaml
- runScript: teardown.js
- <any other command>
---
- launchAppUsage example
Step 1: Create your login subflow
Step 2: Register the hook
Step 3: Run your tests
Dynamic hooks
Handling hook failures
Scenario
Result / Behavior
Related content
Last updated