Team 4 Rooms and Dungeons Test Plan - UQcsse3200/2026-studio-4 GitHub Wiki

Team 4 Rooms and Dungeons Test Plan

Overview

This test plan covers the Team 4 branches. Testing is divided into automated unit tests and manual gameplay tests.

Test Environment

  • Unit testing: JUnit 5 and Mockito
  • Game testing: Desktop application
  • Interaction key: E
  • Debug command: room clear

Run all automated tests with:

cd source
./gradlew spotlessCheck :core:test

Automated Unit Test Plan

Camera Following

FollowingCameraComponentTest

Test Purpose Expected Result
shouldMoveCameraTowardPlayer Move the player ten units after initialising the camera follower. The camera moves 10% of the distance towards the player.

ECS Room Refactor

RoomManagerTest

Test Purpose Expected Result
shouldRegisterRoomAndPlayerAndPlacePlayerAtSpawn Start a room using RoomManager. The room and player are registered, RoomCreated is emitted and the player is placed at the room spawn.

Boundaries and Obstacles

WallComponentTest

Test Purpose Expected Result
shouldSpawnFourBoundaryWalls Create boundary walls for a room. Four wall entities are registered around the terrain.

Dungeon Textures

TextureRenderComponentTest

Test Purpose Expected Result
shouldDrawTextureRegion Render one region taken from a larger texture sheet. The selected region is drawn at the entity's position and size.

The existing shouldDrawTexture test also confirms that normal full textures continue to render correctly.

Declarative Dungeons

WorldConfigTest

Test Purpose Expected Result
shouldLoadGameWorldDefinition Load and validate rooms.json. The room graph loads and configured enemy types are recognised.
shouldRejectBrokenRoomReference Give an exit a missing destination. Validation throws IllegalArgumentException.

RoomManagerTest

Test Purpose Expected Result
shouldFollowPairedDoorsAndRememberClearedRooms Travel through paired doors and return. Transitions are deferred, old rooms are disposed, the player appears inside the matching door and cleared rooms remain cleared.

EnemyManagerComponentTest

Test Purpose Expected Result
shouldNotClearRoomWhileEnemiesRemain Kill only some tracked enemies. The room remains uncleared.
shouldClearRoomWhenLastEnemyDies Kill every tracked enemy. roomCleared is emitted once.
shouldReplaceSplitParentWithTrackedChildren Replace a splitting enemy with two children. Both children are registered and tracked until they die.
shouldClearEveryLivingEnemy Use the debug clear operation. Every tracked enemy dies and the room clears.

LifetimeComponentTest

Test Purpose Expected Result
shouldNotDisposePhysicsAgainWhenOwningRoomIsDisposed Expire a projectile and then dispose its room. The projectile's physics body is disposed only once.

EnemyAnimationDisposalTest

Test Purpose Expected Result
shouldScheduleNormalEnemyDisposalAndDisposeAnimatorOnlyOnce Finish a normal enemy's death animation. Disposal is safely scheduled and its animator is disposed once.
shouldScheduleFloatingDemonDisposal Finish a floating demon's death animation. Disposal is safely scheduled.

Manual Gameplay Test Plan

Camera Following

Test Steps Expected Result
Smooth following Move the player around the room. The camera moves smoothly towards the player.
Large room movement Walk beyond the initially visible area. The camera continues following and reveals the rest of the room.

ECS Room Refactor

Test Steps Expected Result
Room startup Start the game. The room, terrain, player and enemies are created correctly.
Player spawn Observe the player after loading the game. The player starts at the configured spawn position.
Enemy spawning Start a new game. Enemies appear inside the room.

Boundaries and Obstacles

Test Steps Expected Result
Player boundaries Walk into every room edge. The player cannot leave the room.
Enemy boundaries Allow enemies to wander near every edge. Enemies remain inside the room.
Obstacle spawning Start the game several times. Rocks and obstacles appear within the room bounds.
Obstacle collision Walk into an obstacle. The player cannot walk through it.

Dungeon Textures

Test Steps Expected Result
Dungeon floor Start the game. The Dreamland dungeon floor is displayed without visible slicing errors.
Floor variation Inspect the room. Purple and blue floor variations are scattered across the floor.
Obstacles Inspect rocks and barrels. Each obstacle uses a complete, correctly sliced texture.
Edge placement Inspect every room edge. Obstacles do not extend outside the terrain.
Background colour Die and enter the death screen. The background remains grey rather than changing to yellow.

Declarative Dungeons

Test Steps Expected Result
Selection room Start the game. The player begins near the centre and four dungeon bookshelves are visible.
Unavailable dungeons Use the Dungeon Two, Three or Four bookshelf. The player remains in selection and sees an unavailable message.
Enter Dungeon One Use the available bookshelf. The Dungeon One entrance loads.
Locked door Use a door while enemies remain. The transition is blocked with "Defeat all enemies first."
Paired doors Clear a room, use a door and then return. The player appears inside the matching door in both directions.
Cleared room state Leave a cleared room and return. Its enemies do not respawn.
Dungeon completion Clear the end room and use its bookshelf. The player returns to selection and Dungeon One becomes unavailable.
Debug clearing Enter room clear. All enemies in the current room die and the room clears.
Enemy types Visit every Dungeon One room. Bomb, chase and floating-demon enemies appear as configured.
Projectile cleanup Allow a floating demon to fire, clear the room and leave. The transition completes without a Box2D crash.
Repeated transitions Travel between rooms several times. Rooms continue loading and disposing without crashes or duplicated entities.

Areas Not Covered by Automated Tests

  • Obstacle positioning and collision are tested manually.
  • Tilesheet slicing and visual appearance are tested manually.
  • Full room transitions using a real Box2D world are tested manually.
  • Unavailable and completed dungeon messages are not unit tested.
  • The obstacle-renaming cleanup has no dedicated unit test because it only changes internal naming and removes unused asset loading.
  • Chase-enemy children can currently split again, and lethal hits can trigger splitting. This requires an additional regression test and fix.
  • No tests were written for item drop behaviour, but this was tested manually.

AI declaration

This page was generated with LLM assistance (5.6 Sol High). It was asked to summarize the testing efforts on all the branches pushed. Content genreated was reviewed by the team.