Use Telegram client for bot testing (not bot api)

I asked the same question and did not find an answer. So I made two libraries for testing telegram bots:

  1. telegram-test can be used if you made bot using node-telegram-bot-api. It catches bot requests and allows to pretend that we have a valid answer from client.
  2. telegram-test-api can be used with any bot and any technological stack. It is a web server which emulates Telegram API. You can make client requests to it using any client, protocol is very simple.

Both projects are in deep alpha version for now but I haven't seen anything better. You can read an article about those projects (in Russian) here.


Alternatively you can use an MTProto Telegram user account library like MadelineProto in PHP, Telethon and Pyrogram in Python 3. You can use these library to automate an user account to test your bot.

Just to note that you might hit the flood ban if you send message too frequently.