MonkeyBot icon indicating copy to clipboard operation
MonkeyBot copied to clipboard

Testing

Open MarkusKgit opened this issue 6 years ago • 5 comments

Currently the code is completely uncovered by tests. Figure out what parts of the code can be tested easily and which require more work. For a start the services that don't depend on Discord should be tested. Try to find good examples how to test the stuff that is more tightly coupled to Discord like command handling.

MarkusKgit avatar Oct 08 '19 07:10 MarkusKgit

Hi! I could give this a shot if available.

ashwin003 avatar Oct 05 '21 08:10 ashwin003

Hi! Sure - that would be great actually! Testing is where I am currently most lacking, so if you have good ideas how to approach it, I am open for any suggestions.

MarkusKgit avatar Oct 05 '21 08:10 MarkusKgit

I suppose we could start with basic unit tests and foloow them up with integration tests (though I'm not sure how to handle this one for a console application/Discord bot)

ashwin003 avatar Oct 06 '21 01:10 ashwin003

Seems reasonable to start with the Unit Tests. As for integration testing I think it could work if we spin up a second Bot that acts as "client", i.e. issues commands with both correct and incorrect input and observes the responses. I am not sure if we want to go down that path though as it will involve a lot of string magic.

MarkusKgit avatar Oct 06 '21 04:10 MarkusKgit

Unit tests done by #251

MarkusKgit avatar Oct 07 '21 12:10 MarkusKgit