-
Notifications
You must be signed in to change notification settings - Fork 190
Integration with Slack
Rohan Dudam edited this page Jul 26, 2024
·
1 revision
We created a script(post_test_reports_to_slack.py) to post the test reports on Slack channel.
You can generate Slack incoming webhook URL by referring our blog Post pytest test results on Slack and use the generated incoming webhook URL in .env file to set "slack_incoming_webhook_url" parameter. refer env_conf file and rename it to .env file for quick start or create new .env file and copy content from env_conf file.
To generate a test report in .txt or .log format, use '> test_report.log' argument in the py.test command:
For Example, To run the test use the command -> pytest -k example_form --slack_flag y -v > log/pytest_report.log