You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose adding global lifecycle functions to k6, specifically a shared setup and teardown that apply to every test file. This would simplify processes like customizing the handleSummary() function across all tests, enhancing efficiency and consistency in test configurations.
Suggested Solution (optional)
For now, there are some workarounds, like (discussed here):
// file: shared/handleSummary.jsexportfunctionhandleSummary(){console.log("Here's your shared 'handleSummary'")}// file: script1.jsexport{handleSummary}from'./shared/handleSummary.js'exportdefaultfunction(){console.log("Here's one of your scripts")}// file: script2.jsexport{handleSummary}from'./shared/handleSummary.js'exportdefaultfunction(){console.log("Here's another of your scripts")}
but this requires export in every file and with a huge number of tests, this could be a pain!
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered:
Feature Description
I propose adding global lifecycle functions to k6, specifically a shared setup and teardown that apply to every test file. This would simplify processes like customizing the
handleSummary()
function across all tests, enhancing efficiency and consistency in test configurations.Suggested Solution (optional)
For now, there are some workarounds, like (discussed here):
but this requires export in every file and with a huge number of tests, this could be a pain!
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: