Repository navigation
Team 2 test plan
Krish edited this page Sep 3, 2026
·
2 revisions
Testing is divided into automated unit tests and manual gameplay tests.
cd source
./gradlew spotlessCheck :core:test- 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.
| 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 |
- 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.
- Idle transition -> Release all movement keys after walking; confirm the player switches to the idle animation facing the last direction moved.
- Dash -> Press Space while moving; confirm the player moves noticeably faster and covers more distance than a normal walk.
- Dash cooldown -> Press Space again immediately after a dash; confirm the second dash is ignored until the cooldown ends.
- 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);
- 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)
- 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.