telegram-bot-ruby
telegram-bot-ruby copied to clipboard
Testing your bot
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
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 Please share your setup
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.
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.