fac30sb / discord-chatbot-emma-egbie

0 stars 0 forks source link

Simulate commands directed at my bot #39 #54

Closed blackNoir2 closed 7 months ago

blackNoir2 commented 7 months ago

Issue Title: Simulate commands directed at my bot

Issue Description: This issue focuses on Simulate commands directed at my bot but do that it had to be done as part of integration tests mainly because the Discord bot relies on the OpenAI manager to function effectively. When users interact with the bot by asking questions it passed to he OpenAI manager which process the result passes back to the user via the bot and stores the responses in its cache as part of the chat history.

The objective of these integration tests is to verify the bot's behaviour when retrieving chat history from the OpenAI manager

Tasks:

  1. Create integration test cases to verify the bot's behaviour when retrieving chat history.
  2. Implement tests to handle scenarios where the chat history is empty.
  3. Develop tests to validate the generation of fields from question-answer pairs.
  4. Document test cases and setup procedures for clarity and maintainability.

Pull Request Title: Implement Integration Tests for Discord Bot and Simulate commands directed at my bot

Pull Request Description: This pull request implements integration tests for the Discord bot to ensure its seamless operation and effective interaction with other components such as the OpenAI manager. The integration tests cover scenarios including chat history retrieval, handling of empty chat histories, and generation of fields from question-answer pairs.

Video of the test passing https://youtu.be/oEStSAE3tPI

Video of the tests failing which was done intentional to verify if the test captures failure https://youtu.be/EZ1gJlrKBKc