maestro
maestro copied to clipboard
[Feature Request] Add onSuccess/onFaill/onFinish callbacks
Is your feature request related to a problem? Please describe.
Right now there is no ability to run a custom script when test finish
it's will be useful in case integration with third party services
Describe the solution you'd like
we can use a special syntax to solve it
appId: com.example.app
runScript:
- onFinish: reportStatatus.js # on success|fail
- onSucess: reportStatatus.js # on fail
- onFail: reportStatatus.js # on sucess
---
- runFlow: Login.yaml # <-- Run commands from "Login.yaml"
- tapOn: Profile
- assertVisible: "Name: Test User"
Describe alternatives you've considered
also we can use a config.yaml to define onFail onSuccess section
Additional context
also we need somehow pass an extra information to that script
- test filename
- status (success/fail)
- error (if it is fail)
- ...
+1 on this. Right now I'm trying to send test results to a test management tool, but having a hard time sending "Failed" results because there's no "onFail" hook or something similar to run the API call before the execution is interrupted.