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
only maps scenarios in the scenarios section and not the ones in [before](https://www.artillery.io/docs/reference/test-script#before-and-after-sections) and [after](https://www.artillery.io/docs/reference/test-script#before-and-after-sections) sections.
Apologies for the wait. This is a current limitation of before/after hooks, which we'll update the docs with. Unfortunately, it won't work with certain plugins that require adding functions to the scenario (e.g. fake-data or expect). Changing this behaviour is a little bit involved, as it requires refactoring how these hooks work, so we won't be able to tackle this just yet.
As a workaround, I would suggest using a javascript function from the before hook to accomplish the same. Something like:
Version info:
Running this command:
I expected to see this happen:
JSON body has
"name"
key.Instead, this happened:
JSON body is empty (fake data not generated):
I suspect it's because
artillery/packages/artillery-plugin-fake-data/index.js
Lines 41 to 45 in 88a6cf1
only maps scenarios in the
scenarios
section and not the ones in[before](https://www.artillery.io/docs/reference/test-script#before-and-after-sections)
and[after](https://www.artillery.io/docs/reference/test-script#before-and-after-sections)
sections.Files being used:
The text was updated successfully, but these errors were encountered: