Skip to content

Keybinds Test Plan

shravya132 edited this page Oct 16, 2024 · 2 revisions

Test Environment

Framework: JUnit 5

  • Objects Used:
    • KeybindsButtonDisplay (under test)
    • Stage, Spritebatch, Table, Skin, Texture (mocked)
    • ServiceLocator, RenderService, ResourceService (mocked)

Test Cases

1. testBatchIsNotNull():

Purpose: check if Spritebatch initialised through mocking is not null.

Setup: mocks Spritebatch in setup(), then verifies if not null.

Expected Outcome: batch should not be null.

2. testInitialiseComponents():

Purpose: checks mocked initialised components are not null.

Setup: mocks instance of KeybindsButtonDisplay class, its stage, KeybindButton, KeybindMenu, KeybindText, in setup(). Then ensures values are not null.

Expected Outcome: initialised components should not be null.

3. testButtonToggling():

Purpose: checks if button toggles the visibility of keybinds' menu and text display.

Setup: checks if menu and text are not visible, then calls showKeybinds(true) to trigger the visibility of menu and text.

Expected Outcome: menu and text should be visible if showKeybinds is triggered, not visible if not.

4. testDisposeClearsTables():

Purpose: checks if tables dispose.

Setup: calls dispose, which disposes tables of KeybindsButtonDisplay class: Button, Menu and Text.

Expected Outcome: tables should dispose.

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