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

Investigate "integration tests" using another bot #433

Open
mcpenguin opened this issue Jan 24, 2023 · 1 comment
Open

Investigate "integration tests" using another bot #433

mcpenguin opened this issue Jan 24, 2023 · 1 comment
Labels
request Request for a new feature or other modification

Comments

@mcpenguin
Copy link
Contributor

Description of proposed feature

In previous investigations and research (see #251), it was determined that the Discord.js framework is too cumbersome and coupled to write an effective unit testing framework for it, even with our own wrapper class.

However, another possibility to test the bot is to use integration tests in the form of a "tester" bot interacting with the bot and "listening" for a response. This response can then be compared with the expected behavior for the bot.

If this idea is viable, we can then create a followup epic to add the integration test framework for the bot and go from there.

Acceptance Criteria

A proof of concept application involving the current instance of Codey should be produced, showcasing the ability to

  • call commands from Codey (both regular and slash), get a response from Codey, and be able to listen/pipe their response;
  • be able to react to messages from Codey (e.g. for blackjack)
  • be able to interact with modals from Codey (e.g. for RPS)

If one or more of the points is impossible, this should be indicated. A partial test framework is better than none.

@mcpenguin mcpenguin added the request Request for a new feature or other modification label Jan 24, 2023
@mcpenguin mcpenguin self-assigned this Feb 9, 2023
@mcpenguin
Copy link
Contributor Author

Actually, it might be possible to do unit testing with a native Discord.js client as shown here: https://dev.to/heymarkkop/how-to-implement-test-and-mock-discordjs-v13-slash-commands-with-typescript-22lc

However, I do not think it is possible with the Sapphire client. Only when desapphirication is done can we adopt this testing framework.

@mcpenguin mcpenguin added request Request for a new feature or other modification and removed request Request for a new feature or other modification labels Mar 3, 2023
@mcpenguin mcpenguin removed their assignment Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Request for a new feature or other modification
Projects
None yet
Development

No branches or pull requests

1 participant