Package: pytest-discord
pytest-discordSummaryInstallationQuick startMaking a Discord webhookUsageIncrease the verbosity levelOptionsCommand optionsini-optionsDependenciesSummaryA pytest plugin to notify test results to a Discord channel.Installationpip install pytest-discordQuick startMaking a Discord webhookIntro to Webhooks – DiscordUsageSet a webhook URL when executingpytestvia--discord-webhookoption:$ pytest --discord-webhook=<https://discordapp.com/api/webhooks/...>Notification message exampleOr, set a webhook URL to an environment variablePYTEST_DISCORD_WEBHOOK:$ export PYTEST_DISCORD_WEBHOOK=<https://discordapp.com/api/webhooks/...>
$ pytestOr, you can specify a webhook URL of a discord channel viaini-options(described later).Increase the verbosity level$ pytest --discord-verbose=1Notification message exampleNotification messages may omit information caused by Discord limitations (especially when errors occur).
You can get full messages as an attached markdown file with--discord-attach-fileoption.OptionsCommand optionsnotify test results to a discord channel:
  --discord-webhook=WEBHOOK_URL
                        discord webhook url of a discord channel to notify pytest results. you can also specify the value with PYTEST_DISCORD_WEBHOOK environment variable.
  --discord-verbose=VERBOSITY_LEVEL
                        Verbosity level for pytest-discord.
                        If not set, use the verbosity level of pytest.
                        Defaults to 0.
                        you can also specify the value with PYTEST_DISCORD_VERBOSE environment variable.
  --discord-username=DISCORD_USERNAME
                        name for a message. defaults to pytest. you can also specify the value with PYTEST_DISCORD_USERNAME environment variable.
  --discord-success-icon=ICON_URL
                        url to an icon of a successful run. you can also specify the value with PYTEST_DISCORD_SUCCESS_ICON environment variable.
  --discord-skip-icon=ICON_URL
                        url to an icon of a skipped run. you can also specify the value with PYTEST_DISCORD_SKIP_ICON environment variable.
  --discord-fail-icon=ICON_URL
                        url to an icon of a failed run. you can also specify the value with PYTEST_DISCORD_FAIL_ICON environment variable.
  --discord-attach-file
                        post pytest results as a markdown file to a discord channel. you can also specify the value with PYTEST_DISCORD_ATTACH_FILE environment variable.ini-options[pytest] ini-options in the firstpytest.ini/tox.ini/setup.cfg/pyproject.toml (pytest 6.0.0 or later)file found:discord_webhook (string):
                      discord webhook url of a discord channel to notify pytest results.
discord_verbose (string):
                      Verbosity level for pytest-discord. If not set, use the verbosity level of pytest. Defaults to 0.
discord_username (string):
                      name for a message. defaults to pytest.
discord_success_icon (string):
                      url to an icon of a successful run.
discord_skip_icon (string):
                      url to an icon of a skipped run.
discord_fail_icon (string):
                      url to an icon of a failed run.
discord_attach_file (bool):
                      post pytest results as a markdown file to a discord channel.Example ofpyproject.toml:[tool.pytest.ini_options]discord_webhook="https://discordapp.com/api/webhooks/..."md_report_verbose=1Example ofsetup.cfg:[tool:pytest]discord_webhook=https://discordapp.com/api/webhooks/...md_report_verbose=1DependenciesPython 3.7+Python package dependencies (automatically installed)