Skip to content

Testing Plan for Player's UI ‐ Manual testing

manya-k edited this page Sep 11, 2024 · 5 revisions

The following manual testing plan ensures that the PlayerInventoryDisplay class works as expected on the UI and handles different scenarios, including edge cases. The goal is to verify that the inventory system reflects real-time changes when items are picked up and used, ensuring accurate display of quantities and UI updates. Since UI Components are not testable, manual testing in with the following plan was conducting. This document provides evidence of correct functionality


Objective

Test the functionality of the PlayerInventoryDisplay class, focusing on the following:

  • Correct display of items and their quantities in the inventory.
  • Real-time updates when items are picked up or used.
  • Appropriate handling of edge cases (e.g., no items, using the last item).
  • Display consistency across different screen resolutions and game stages.

Functionality Tests

1. Initial Setup

Purpose: Ensure that the PlayerInventoryDisplay component is correctly initialized when the game starts. Test Steps:

  1. Launch the game.
  2. Start a new game session.
  3. Verify that the inventory display appears on the bottom left corner of the screen with the heading "Collected:" and then underneath images and name of the item with zero count.

Expected Results:

  • The inventory display is visible on the bottom left.
  • The heading "Collected:" is shown, with all items with zero count.

2. Item Pickup Updates

Purpose: Test that the inventory display updates when the player picks up items and shows the correct item count. Test Steps:

  1. Have the player pick up the following items in the game:
    • 2 Medkits
    • 1 Shield Potion
    • 1 Bandages
  2. Observe that the count increments but their position remains the same:

Expected Results:

  • After picking up 2 Medkits, the inventory displays "Medkit x2".
  • After picking up 1 Shield Potion, the inventory displays "Shield Potion x1".
  • After picking up 3 Bandages, the inventory displays "Bandage x3".
  • The inventory updates immediately after each item is picked up, without delays.

3. Item Usage Updates

Purpose: Verify that the inventory display updates correctly when items are used, reducing the item count on the display. Test Steps:

  1. Collect 2 MedKits
  2. Use 1 Medkit from the player's inventory.
  3. Observe the inventory display after the item is used.

Expected Results:

  • After using 1 Medkit, the inventory displays "Medkit x1".
  • After using the last MedKit, the inventory displays "Medkit x0".
  • The item counts decrease immediately after each item is used, reflecting accurate quantities.

4. Edge Case: Item Count Reaches Zero

Purpose: Test that the inventory display handles the case where the item count reaches zero correctly and does not hide the item.

Test Steps:

  1. Use all remaining items in the inventory (e.g., Medkits, Shield Potions, Bandages) until their quantities reach zero.
  2. Observe the inventory display when the item count reaches zero.

Expected Results:

  • The items remain visible in the inventory display, but their count shows as "x0" instead of disappearing.
  • The count updates correctly when the player uses the last item.

5. Edge Case: Picking Up Additional Items After Zero Count

Purpose: Verify that the inventory display updates correctly when the player picks up additional items of the same type after the count has reached zero.

Test Steps:

  1. Pick up an additional Medkit after the inventory displays "Medkit x0".
  2. Observe the inventory display.

Expected Results:

  • After picking up a Medkit, the inventory updates from "Medkit x0" to "Medkit x1".
  • The count updates correctly after additional items are picked up, even after reaching zero.

6. Displaying Item Effects on the Health Bar

Purpose: Test that when certain items (like Shield Potion) are used, their effects are visually displayed on the health bar.

Test Steps:

  1. Pick up a Shield Potion.
  2. Use the Shield Potion.
  3. Observe the player's health bar after using the Shield Potion.

Expected Results:

  • After using the Shield Potion, a shield icon or effect is displayed over the health bar, indicating that the shield is active.
  • The inventory display updates, showing "Shield Potion x0" or reducing the quantity accordingly.

7. UI Consistency Across Resolutions

Purpose: Ensure that the inventory display maintains its layout and functionality across different screen resolutions.

Tst Steps:

  1. Test the game in different screen resolutions (e.g., 1280x720, 1920x1080).
  2. Observe the inventory display's placement, alignment, and functionality in each resolution.

Expected Results:

  • The inventory display remains at the bottom left of the screen and scales appropriately.
  • Items and text are clearly visible and aligned correctly.
  • The functionality (item pickups and usage) works consistently across all resolutions.

9. Performance Testing Purpose: Test the performance of the inventory display when many items are picked up and used during extended gameplay.

Test Steps:

  1. Play the game for an extended period and pick up and use a variety of items.
  2. Monitor the performance of the UI and ensure that there are no delays or stutters when updating the inventory display.

Expected Results:

  • The inventory display updates smoothly and without delay, even after extended gameplay and numerous item pickups and usages.
  • No performance degradation or UI glitches occur.

10. Stress Testing: Large Number of Items

Purpose: Test how the inventory display handles a large number of different items in the player's inventory.

Test Steps:

  1. Modify the game or add a large number of items to player's inventory.
  2. Observe how the inventory display manages the large number of items.

Expected Results:

  • The inventory display correctly shows all items without cutting off or overlapping.
  • The display remains functional and easy to read, even with many items listed.

Conclusion

This manual testing plan covers essential functional and edge case scenarios for the PlayerInventoryDisplay class. It ensures that the real-time display of items on the GUI behaves as expected, providing a smooth and accurate representation of the player’s inventory during gameplay.

Table of Contents

Home

Design

Design Document

Design Choices

Game Wiki

Gameplay

Controls

Game Features

Utilities
Animals
Menus/screens
Character
Map
Weapon
Projectile
Items
Music/sound

User Guide

Starting the game

Game Engine

Getting Started

Entities and Components

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Enhancement of Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally