artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.04k stars 511 forks source link

Specifying beforeRequest and afterResponse at config or scenario level #788

Open tsondergaard opened 4 years ago

tsondergaard commented 4 years ago

It would be nice if it was possible to add beforeRequest and afterResponse hooks once for a whole config or for a whole scenario instead of having to specify them for individual requests.

My use case is adding custom stats per end-point using the procedure described by @hassy in https://github.com/artilleryio/artillery/issues/231#issuecomment-266814522.

hassy commented 4 years ago

https://github.com/artilleryio/artillery-plugin-metrics-by-endpoint is probably what you're looking for :)