Animal Testing - UQcsse3200/2024-studio-1 GitHub Wiki
Test Plan for Beast Breakout
Overview
This test plan outlines the testing strategy for Beast Breakout, a top-down dungeon crawler game. The plan covers various components of the game, including NPCs, combat mechanics, and AI tasks.
Components Being Tested
NPC Components
- NPCDeathHandler
- BossHealthDialogueComponent
Attack Components
- AOEAttackComponent
- AttackComponent
- MeleeAttackComponent
- RangeAttackComponent
- BossRangeAttackComponent
AI Tasks
- BulletStormTask
- ChargeTask
- ChaseTask
- JumpTask
- MovementTask
- RunAwayTask
- StraightWanderTask
- WaitTask
- WanderTask
Configuration
- NPCConfigs
Unit Testing
NPCDeathHandler
-
Death Event Triggering:
- Ensure that the death event is properly triggered when the "died" event is fired.
- Verify that the death animation starts when available.
- Check that the entity's ID is added to the
deadEntities
list upon death.
-
Multiple Death Prevention:
- Verify that the death process is only called once, even if the "died" event is triggered multiple times.
-
Handling Absence of Death Animation:
- Ensure proper handling when no death animation is available.
BossHealthDialogueComponent
-
Dialogue Triggering at Health Thresholds:
- Test dialogue triggers at 75%, 50%, and 25% health.
- Verify no dialogue is triggered above 75% health.
-
Alert Box Service Interaction:
- Ensure correct interaction with AlertBoxService for displaying dialogues.
Attack Components
For each attack component (AOE, Melee, Range):
-
Attack Execution:
- Verify attacks are performed correctly when in range.
- Ensure no attacks occur during cooldown periods.
- Check that attacks don't happen when out of range.
-
Damage Calculation:
- Test if damage is calculated and applied correctly.
-
Cooldown Management:
- Verify cooldown timers work as expected.
AI Tasks
For each AI task:
-
Task Initialization:
- Verify correct setup of task parameters.
-
Task Execution:
- Test start, update, and stop methods for correct behavior.
-
Priority Handling:
- Check if tasks return correct priorities based on game state.
-
Interaction with Game Environment:
- Verify tasks interact correctly with other game components (e.g., physics, combat).
NPCConfigs
-
Config Loading:
- Test if NPC configurations are loaded correctly.
-
Config Retrieval:
- Verify getConfig() method returns correct configurations.
-
NPC Types:
- Ensure getNpcTypes() returns all defined NPC types.
Integration Testing
-
NPC Lifecycle:
- Test the complete lifecycle of NPCs from spawning to death.
- Verify interactions between different components (e.g., AI tasks, combat, death handling).
-
Combat System Integration:
- Test interactions between attack components and NPC health/death systems.
-
AI Behavior in Game Environment:
- Verify AI tasks work correctly in conjunction with the game's physics and level design.
-
Boss Encounters:
- Test boss-specific behaviors, including health-based dialogue triggers and special attacks.
Playtest Scenarios
-
Room Clearing:
- Verify player can clear rooms of enemies effectively.
-
Boss Battles:
- Test boss encounters for appropriate difficulty and mechanics.
-
Power-up System:
- Verify power-ups affect gameplay as intended.
-
Permadeath and Game Restart:
- Ensure game properly restarts with a new dungeon upon player death.
-
Procedural Generation:
- Test variety and balance of procedurally generated levels.
Performance Testing
-
Frame Rate:
- Monitor frame rate stability, especially in rooms with many NPCs.
-
Memory Usage:
- Check for memory leaks, particularly during extended play sessions.
-
Loading Times:
- Measure and optimize loading times between rooms and levels.
User Testing
-
Gameplay Feedback:
- Gather user feedback on game mechanics, difficulty, and enjoyment.
-
UI/UX Testing:
- Assess clarity of user interface and game information presentation.
-
Tutorial Effectiveness:
- Evaluate how well new players understand game mechanics through the tutorial.
Conclusion
This test plan covers the core components and gameplay elements of Beast Breakout. Regular testing using this plan will help ensure a robust, enjoyable gaming experience that aligns with the game's design goals.