How to test Telegram Bot

How to test Telegram Bot


good dog

I have great experience for testing bots. Everyday I test some bot using difficult scenarios. For this time I found good and fast ways for testing bots.

Easy way for simple bot

First of all we need a bot (or not). Then we just open any telegram client and start working with the bot. For example, take my super simple @watmsgbot

Screenshot

And take note or any text editor for writing test instructions in a human test script. Here is what you need to write in the script:

Test N1 (some text message)
1. IN: test
2. OUT: [yaml metadata of message]

Test N2 (/yaml or /json)
1. IN: /json | /yaml
2. OUT: [json/yaml metadata of message]

Test N3 (group chat)
1. Open some chat
2. Add the bot in the chat
3. IN[the_chat]: @watmsgbot test
4. OUT[private]: [json/yaml metadata of message]

These three scenarios completely satisfy our needs. We just need to go through the list and make sure that everything is fine. So we will never miss anything. But what if we want to automate this work?

To be continued..

Report Page