Test Plan for CompanionPowerupActivationDisplay - UQcsse3200/2023-studio-2 GitHub Wiki
Overview
The test plan for the CompanionPowerupActivationDisplay
component is designed to ensure the correct functionality and reliability of the UI element responsible for displaying and activating powerups in a game. The component interacts with the powerup inventory
and offers a user-friendly interface for powerup selection.
Test Objectives
Verify that the UI component initialises correctly and sets up its components properly.
- Powerup Activation with the Available Powerup.
- Set the powerup inventory to be empty and verify the behavior of the UI component.
- Trigger the
powerupInventoryChange
event and verify that the UI updates in response to the event.
Test Cases
- Trigger the
powerupInventoryChange
event and verify that the UI updates in response to the event.
This test focuses on the event handling mechanism of the UI component. It ensures that when the powerupInventoryChange
event is triggered, the UI updates correctly to reflect changes in the powerup
inventory.
- Simulate an empty powerup inventory and attempt to activate a
powerup
using the UI component.
This test covers a scenario where there are no available powerups in the inventory. It checks that the UI component handles this situation gracefully without attempting to activate a non-existent powerup.
Mock Objects
@Mock
private CompanionPowerupInventoryComponent powerupInventory;
Conclusion
The test plan for the CompanionPowerupActivationDisplay
component has been designed to comprehensively assess the functionality and reliability of the user interface (UI) element responsible for displaying and activating powerups in the game. The testing process covered various aspects, including initialization, powerup activation, event handling, boundary cases, performance, exception handling, usability, and documentation.
Contributors
- Gaurika Diwan @gaurikadiwan