shaunagm / WelcomeBot

Other
35 stars 43 forks source link

Make test suite #17

Closed shaunagm closed 10 years ago

shaunagm commented 10 years ago

Probably a good start is to just list the things we want to test. This could go in the readme for manual testing. At some point it would be nice to set up automated testing, too.

shaunagm commented 10 years ago

Here are some resources to consult:

Feel free to comment with advice about how testing works or how to design tests for this particular project!

pdurbin commented 10 years ago

Yesterday I asked @therealprologic if he'd be interested in writing a test for his Python IRC bot and he did!

His bot has a very similar "greeting" feature for when people join a channel and here is the test: https://bitbucket.org/prologic/kdb/src/4964e018ef81ea2d7f4431a45160174da7b16f76/tests/plugins/test_greeting.py

This is what the test looks like when it's running: http://codepad.org/SuxTUSSg

Here's our conversation about how to write tests for IRC bots: http://irclogs.shortcircuit.net.au/%23circuits/2014-05-11.log.html

(See also http://stackoverflow.com/questions/7546026/testing-an-irc-bot and http://programmers.stackexchange.com/questions/132263/testing-an-irc-bot )

I think we could learn a lot from his work in this area.

shaunagm commented 10 years ago

Done! Well, inasmuch as testing is ever done:

https://github.com/shaunagm/WelcomeBot/commit/3b545ee35f1928833b3ed82722668e64eac954f5