Skip to content

Team 2 test plan

Krish edited this page Sep 3, 2026 · 2 revisions

Testing is divided into automated unit tests and manual gameplay tests.

Automated Unit Testing

cd source
./gradlew spotlessCheck :core:test

Files:

  • CombatStatComponents.java: Tests getters/setters for health, max health, base attack, movement speed, and attack speed, including bounds checking (e.g. rejecting negative values, clamping health to max) and relative add* methods. Also verifies that successful stat changes trigger the correct UI update events.
  • KeyboardPlayerInputComponentTest.java: Verifies each keybinding (WASD, Space, J, K, E) triggers the correct player event(s) with the correct data (e.g. walk direction), including diagonal movement and that unbound keys are ignored.
  • PlayerActionsTest.java: Tests player movement, dashing, and attacking end-to-end using mocked physics and animation components; covers walk/idle animation switching, dash speed and cooldown behaviour, and attack direction facing.
  • PlayerAnimationControllerTest.java: Tests that each gameplay event (walk, idle, attack in each direction) triggers the correct animation, and that attack animations lock out movement animations until finished.

Manual Testing

Keybindings:-

Key Action
W / A / S / D Walk up / left / down / right (diagonal movement supported)
Space Dash in the current walk direction
J Attack
K Special attack
E Interact (room navigation) and item pickup
  1. Movement -> Start the game, walk in each of the 4 cardinal directions using W/A/S/D; confirm the player sprite animates correctly and moves in the expected direction.
  2. Idle transition -> Release all movement keys after walking; confirm the player switches to the idle animation facing the last direction moved.
  3. Dash -> Press Space while moving; confirm the player moves noticeably faster and covers more distance than a normal walk.
  4. Dash cooldown -> Press Space again immediately after a dash; confirm the second dash is ignored until the cooldown ends.
  5. Attack -> Press J while stationary and while moving in different directions; confirm the attack animation matches the direction the player is facing. Special attack: Press K(only plays sound for this sprint);
  6. Interact / item pickup on E —> Stand near a pickup item and press E; confirm both the interact and item-pickup behaviours fire without interfering with each other. Also test E near a room-navigation trigger separately to confirm the two systems don't conflict. (collab with other teams to select a single key for both this spring will change to diff keys in upcoming sprints)
  7. Stats display sync -> Take damage, gain base attack(strength), change movement/attack speed (e.g. via player.json through code); confirm the UI (health bar and label, strength, movement speed, attack speed) updates immediately and correctly for each.

Table of Contents

Home

Test Plan

Team 2

Features

Components
Player
Items and Inventory
Enemies
Interactable NPCs
Cutscenes and Dialogue
Music
Bosses
Rooms
Weapons
Abilities & Spells
Game Screens and Areas
Dungeons

Game Engine

Getting Started

Entities and Components

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Terrain

Concurrency & Threading

Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally