Telegram bot for Allure TestOps
- Python 3.8+
- MongoDB 5.0+
- Allure TestOps compatibility
- Subscriptions
- Mongo persistence
- Pie chart report
- Detailed logger
- User / group subscribes to launch information: all or critical
- The bot checks new launches in the program every 20 minutes
- The bot notifies the user / group of new launches
- The bot stores processed launches in the database
- /help - shows list of commands
- /notify_all - subscribes to all launches
- /notify_critical - subscribes to critical launches according percentage of failed tests
- /remove_notify - unsubscribes from all launches
Deployment is available both through the launch of the repository and through the docker image
-
Download repository or docker image
via repository:
git clone https://github.com/eftech-open/allure-telegram-bot.git && cd allure-telegram-bot
via docker image:
docker pull eftech-open/allure-telegram-bot:1.0.0
-
Generate .env-file with required variables
python3 setup_bot.py
-
Run bot
via repository:
python3 bot.py
via docker image:
docker run -d --env-file ./.env eftech-open/allure-telegram-bot:master
via docker-compose:
docker-compose -f docker-compose.yml up -d
The following variables are available for launching and configuring the bot
Variables | Description | Default |
---|---|---|
ALLURE_PROJECT | Allure TestOps project ID | Not set |
ALLURE_URL | Allure TestOps URL | Not set |
ALLURE_TOKEN | Allure TestOps user API_token | Not set |
BOT_TOKEN | Telegram bot token | Not set |
MONGO_HOST | MongoDB host address | mongo_db |
MONGO_PORT | MongoDB port | 27017 |
MONGO_DATABASE | MongoDB database | allure_bot |
REPORT_INTERVAL | Frequency of checking for new launches (minutes) | 20 |
REPORT_TIMEDELTA | Search for new launches in interval (minutes) | 200 |
REPORT_CHART_PATH | Temporary image storage directory | ./tmp/ |
REPORT_CRITICAL_PERCENT | Percentage of failed tests in run for critical notification | 50 |
TIMEZONE | Time zone for cron jobs | UTC |
CLEAR_DB_LAUNCHES | Clearing report images | True |
CLEAR_DATE_TMP | Cron interval for clearing report images | 59 23 */5 * * |