k6-docs
k6-docs copied to clipboard
Documentation feedback: /docs/sources/k6/v0.55.x/javascript-api/k6-execution.md
It would be useful to know how to alter the return/exit code of k6 from the script. I.e. how can I communicate to code calling k6 that this run of k6 was successful or unsuccessful?
@grafana/k6-core is this doable from a k6 script? 🤔
@bernhard-dwe, the abort() method stops the test run and exits with a predefined 108 code. If you want to keep the test running but mark it as failed upon exit, then this issue may be relevant to you. We are gathering requirements and would love to learn more about your use case. Please feel free to comment on the issue!