Integration tests
This section details the integration tests designed to validate the Language Learning Discord Bot (LDB) use cases against their functional requirements. The tests are constructed around the user journey within the Discord environment, ensuring that all interactions with the bot yield the expected outcomes. Mock objects are employed to simulate user inputs and server responses, facilitating an automated and repeatable testing process without manual data entry or result interpretation.
Use Case Integration Tests
Test Case 1: Verify that the LDB can be successfully installed and invited to a Discord server.
Test Steps:
- Install the LDB on a Discord server.
- Invite the LDB to a Discord server.
Expected Results:
- The LDB should be successfully installed on the Discord server.
- The LDB should be successfully invited to the Discord server.
Test Case 2: Verify that users can create an account and select a starter language.
- Test Steps:
- Create a new Discord account.
- Invite the LDB to a Discord server.
- Send the /start command to the LDB.
- Select a starter language.
- Expected Results:
- The LDB should successfully create a new account for the user.
- The LDB should successfully set the user's starter language.
Test Case 3: Verify that users can access the full command list and view the leaderboard.
- Test Steps:
- Send the /help command to the LDB.
- Verify that the full command list is displayed.
- Send the /leaderboard command to the LDB.
- Verify that the leaderboard is displayed.
- Expected Results:
- The LDB should successfully display the full command list.
- The LDB should successfully display the leaderboard.
Test Case 4: Verify that users can start and complete vocabulary and pronunciation quizzes.
- Test Steps:
- Send the /startVocabQuiz command to the LDB.
- Select a level and start the quiz.
- Answer all of the questions in the quiz.
- Verify that the quiz results are displayed.
- Send the /startVoiceQuiz command to the LDB.
- Join a voice channel on the server.
- Pronounce the words as instructed by the LDB.
- Verify that the pronunciation results are displayed.
- Expected Results:
- The LDB should successfully start a vocabulary or pronunciation quiz.
- The LDB should successfully grade the user's answers and display the quiz results.
Test Case 5: Verify that user progress is saved and retrieved accurately.
- Test Steps:
- Create a new Discord account.
- Invite the LDB to a Discord server.
- Create an account and select a starter language.
- Complete a vocabulary or pronunciation quiz.
- Log out of the Discord account.
- Log back into the Discord account.
- Send the /myScores command to the LDB.
- Verify that the user's quiz scores are displayed correctly.
- Expected Results:
- The LDB should successfully save the user's progress.
- The LDB should successfully retrieve the user's progress from the database.
- The user's quiz scores should be displayed correctly.
Test Case 6: Verify that the LDB can send notifications to users.
- Test Steps:
- Create a new Discord account.
- Invite the LDB to a Discord server.
- Create an account and select a starter language.
- Enable notifications from the LDB.
- Wait for a notification to be sent from the LDB.
- Expected Results:
- The LDB should successfully send a notification to the user.
- The notification should be displayed correctly in the Discord client.
Integration Test Environment
The integration testing will be conducted on a dedicated Discord server. The following hardware and software requirements will be used:
- Hardware: Devices running on the following Operating System
- OSX
- Windows
- Linux
- Android
- Discord Server LDB Server (https://discord.gg/zW5RbpbTT)