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

  1. 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.
  2. Multiple Death Prevention:

    • Verify that the death process is only called once, even if the "died" event is triggered multiple times.
  3. Handling Absence of Death Animation:

    • Ensure proper handling when no death animation is available.

BossHealthDialogueComponent

  1. Dialogue Triggering at Health Thresholds:

    • Test dialogue triggers at 75%, 50%, and 25% health.
    • Verify no dialogue is triggered above 75% health.
  2. Alert Box Service Interaction:

    • Ensure correct interaction with AlertBoxService for displaying dialogues.

Attack Components

For each attack component (AOE, Melee, Range):

  1. 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.
  2. Damage Calculation:

    • Test if damage is calculated and applied correctly.
  3. Cooldown Management:

    • Verify cooldown timers work as expected.

AI Tasks

For each AI task:

  1. Task Initialization:

    • Verify correct setup of task parameters.
  2. Task Execution:

    • Test start, update, and stop methods for correct behavior.
  3. Priority Handling:

    • Check if tasks return correct priorities based on game state.
  4. Interaction with Game Environment:

    • Verify tasks interact correctly with other game components (e.g., physics, combat).

NPCConfigs

  1. Config Loading:

    • Test if NPC configurations are loaded correctly.
  2. Config Retrieval:

    • Verify getConfig() method returns correct configurations.
  3. NPC Types:

    • Ensure getNpcTypes() returns all defined NPC types.

Integration Testing

  1. NPC Lifecycle:

    • Test the complete lifecycle of NPCs from spawning to death.
    • Verify interactions between different components (e.g., AI tasks, combat, death handling).
  2. Combat System Integration:

    • Test interactions between attack components and NPC health/death systems.
  3. AI Behavior in Game Environment:

    • Verify AI tasks work correctly in conjunction with the game's physics and level design.
  4. Boss Encounters:

    • Test boss-specific behaviors, including health-based dialogue triggers and special attacks.

Playtest Scenarios

  1. Room Clearing:

    • Verify player can clear rooms of enemies effectively.
  2. Boss Battles:

    • Test boss encounters for appropriate difficulty and mechanics.
  3. Power-up System:

    • Verify power-ups affect gameplay as intended.
  4. Permadeath and Game Restart:

    • Ensure game properly restarts with a new dungeon upon player death.
  5. Procedural Generation:

    • Test variety and balance of procedurally generated levels.

Performance Testing

  1. Frame Rate:

    • Monitor frame rate stability, especially in rooms with many NPCs.
  2. Memory Usage:

    • Check for memory leaks, particularly during extended play sessions.
  3. Loading Times:

    • Measure and optimize loading times between rooms and levels.

User Testing

  1. Gameplay Feedback:

    • Gather user feedback on game mechanics, difficulty, and enjoyment.
  2. UI/UX Testing:

    • Assess clarity of user interface and game information presentation.
  3. 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.