Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End-to-end tests #57

Open
OrBin opened this issue Apr 20, 2019 · 0 comments
Open

End-to-end tests #57

OrBin opened this issue Apr 20, 2019 · 0 comments
Labels
testing Add or modify tests

Comments

@OrBin
Copy link
Owner

OrBin commented Apr 20, 2019

Note: This is a follow-up task for #10.

We should create end-to-end tests for gramhopper.

The flow will be a creation of CombinedConversationHandler and/or CombinedMessageHandler, with mocked parts.
The idea is mocking the bot parameter/object, in order to log the responses so they can be tested.
For the mock, we probably should inherit CombinedMessageHandler, because it inherits MessageHandler and uses MessageHandler.handle_update() to call the updates-handling callback with the bot parameter. Maybe the dispatcher has to be mocked/inherited too.

We haven't yet thought about how to deeply mock incoming updates/messages - maybe we would like to override the function (I don't know which one it is) that checks for incoming updates and handles them (I guess it's in one of Update or Dispatcher classes).

We will begin with reading and parsing the configuration, through generating test messages to trigger the triggers, and checking the responded messages in the end.

@OrBin OrBin added the testing Add or modify tests label Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Add or modify tests
Projects
None yet
Development

No branches or pull requests

1 participant