Skip to content

Cutscene Test Plan

bhavyamalik1 edited this page Oct 2, 2024 · 2 revisions

Test Environment

  • Framework: JUnit 4
  • Objects Used: Cutscene, ResourceService (mocked), GameTime (mocked), Entity (mocked), EventHandler (mocked), Scene (mocked)

Test Cases - Testing SensorComponent Methods

  1. Cutscene Initialisation - The purpose is to verify that the Cutscene is properly initialised with necessary components like ResourceService, GameTime, and the entity's event system. The expected result is that the Cutscene object, GameTime, and ResourceService should not be null, and the event handler from entity.getEvents() should be correctly set up.

  2. Asset Loading - The purpose is to ensure the correct assets are loaded for the cutscene by ResourceService. The expected result is that ResourceService.loadTextures() should be called with appropriate texture paths, and ResourceService.loadAll() should ensure all required assets are loaded.

  3. Scene Setup - The purpose is to verify that the cutscene's scenes are properly set up with background images and text. The expected result is that the correct number of scenes should be created, with the first scene containing the expected background image and dialogue.

  4. Entity Creation - The purpose is to confirm that the entities like background and animation are created and registered correctly during the cutscene. The expected result is that when loadScene(0) is called, the entities are created, and ServiceLocator.getEntityService().register() is called for each entity.

  5. Scene Transitions - The purpose is to ensure the cutscene transitions to the next scene after the current scene's duration has passed. The expected result is that the scene should not transition before the time is up, but should do so afterward, and trigger the "cutsceneEnded" event if no more scenes exist.

  6. Handling Entity Disposal - The purpose is to verify that all entities are disposed of correctly when transitioning between scenes or when the cutscene ends. The expected result is that disposeEntities() is called, each entity is disposed, and ServiceLocator.getEntityService().unregister() is called for each entity.

Table of Contents

Home

Team Design Document

Game Features

Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes

Game

Getting Started

Entities and Components

World Backstory

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Map Design

Test Plans

Sensor Component

Customer Sensor Component

Interaction Component

Inventory Component

Inventory Display

Station Meal Component

Station Progress Display

Keyboard Input Component

Fire Extinguisher Handler Component

Score System

HoverBox Component

MainGameActions Create Docket Triggers

End Day Display Component

Cutscene Area

Docket

Docket Line Display

Docket Meal Display

Main Game Order Button Display

Order Actions

Recipe

Ticket Details Component

BackstoryCutscene Test Plan

BackstoryCutsceneDisplay Test Plan

Test Plan for Tutorial

Keybinds

Keybinds Test Plan

Test Plan for MainGameOrderTicketDisplay

Test Plan for MainGameOrderBtnDisplay

Test Plan for Docket

Test Plan for DocketLineDisplay

Test Plan for OrderActions

Ticket Details

Test plan for RandomComboService

Test plan for LoanUpgrade

Test plan for UpgradesDisplay

Test plan for RageUpgrade

Test plan for SpeedBoostUpgrade

Test plan for DancePartyUpgrade

Test plan for ExtortionUpgrade

Troubleshooting

MacOS Setup Guide

Clone this wiki locally