Skip to content

Documentation Improvement - Event hooks #3338

@PaulWestenthanner

Description

@PaulWestenthanner

Prerequisites

Description

I've been getting an error that my test_stop hook is expecting the keyword argument environment.

For some hooks the documentation states the possible arguments (e.g. for request hook) for others it does not.
https://docs.locust.io/en/stable/api.html#locust.event.Events.request
It would be nice if the documentation would be complete at this point.
From what I saw the correct parameters need to be added to these docstrings here

locust/locust/event.py

Lines 218 to 231 in ea5a230

test_stopping: EventHook
"""
Fired on each node when a load test is about to stop - before stopping users.
"""
test_stop: EventHook
"""
Fired on each node when a load test is stopped.
"""
reset_stats: EventHook
"""
Fired when the Reset Stats button is clicked in the web UI.
"""

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions