Pytest to Telegram reporting plugin
- Free software: MIT license
- Requests
You can install "pytest-telegram" via pip:
$ pip install pytest-telegram
- Use this plugin by running pytest normally and use the following options to customize report:
>>> telegram:
--telegram_id=CHAT_ID
Id of telegram chat
--telegram_token=BOT_TOKEN
Telegram Bot token
--telegram_report_url=URL
Link for test report, optional
--telegram_custom_text=TEXT
Custom text, will be added for message, supports '\n' as newline, optional
--telegram_success_sticker_id=FILE_ID
File id of telegram sticker which will be attach to Success report
--telegram_fail_sticker_id=FILE_ID
File id of telegram sticker which will be attach to Failed report
--telegram_disable_stickers
Disables stickers for bot
--telegram_list_failed
Bot will send failed test names
$ pytest ./tests --telegram_id=100559633 --telegram_token=123:qwe --telegram_report_url=http://path.to.report --telegram_custom_text="This is custom text"
Success report:
Failed report:
If you encounter any problems, please file an issue along with a detailed description.