Skip to content

pytest_broadcaster_add_destination¤

pytest_broadcaster_add_destination ¤

pytest_broadcaster_add_destination(
    add: Callable[[Destination], None]
) -> None

Called on plugin initialization.

Use it to add your own destination.

For instance, in conftest.py:

from pytest_broadcaster import HTTPWebhook

def pytest_broadcaster_add_destination(add):
    add(HTTPWebhook(url="https://example.com"))
    add(HTTPWebhook(url="https://another-example.com"))

Then run pytest without any option:

pytest