telegram-bot-ruby icon indicating copy to clipboard operation
telegram-bot-ruby copied to clipboard

Testing your bot

Open chriso0710 opened this issue 8 years ago • 3 comments

Hi all,

I made my second bot with this great gem. I would like to do some automatic testing of my bots commands. I am thinking of using Minitest, Webmock and VCR. What would be the best approach to do this? Would it even be possible to test without making real connections to Telegram servers?

Any thoughts on that?

Thanks Christian

chriso0710 avatar Nov 12 '16 12:11 chriso0710

Just answering my own question here :-) I now have some automatic tests for my bot (which uses webhooks) running with

minitest rack-test vcr ngrok

I recorded JSON data from Telegram with ngrok and am replaying it in my tests. Works great so far.

chriso0710 avatar Nov 30 '17 10:11 chriso0710

@chriso0710 Please share your setup

edenworky avatar Feb 01 '21 14:02 edenworky

The project is not active anymore. It was a small side-project 3 years ago and I have no easy access to the project (and no free time) to restore it quickly. Sorry, @edenworky. But you should still be ok with the mentioned gems/tools. ngrok is great, highly recommended.

chriso0710 avatar Feb 01 '21 14:02 chriso0710

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Feb 19 '23 15:02 github-actions[bot]