Testing Plan for Player's UI ‐ Manual testing - UQcsse3200/2024-studio-1 GitHub Wiki

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.

Successful upon testing Expected Results:

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

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 all the usable items randomly spawned on the item
  2. Observe that the count increments but their position remains the same:
  3. observe that Only usable items are displayed not buff items

Successful upon testing

Expected Results:

  • all the Usable items that were once on screen are displayed with their count in the list Successful when tested Evidence: Items on the map

image

After Picking up usable items (as expected)

image


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.

successful when tested Evidence: after collecting two medkits:

image

after using 1 medkit, there is still one remaining:

image

after using all the medkits:

image


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.

Successful upon testing Evidence: after collecting different items:

image

after using all the items:

image


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.

Successful upon testing Evidence: after collecting different items:

image

after using all the items:

image

Now collecting more items:

image


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 i.e 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.

Successful upon testing Evidence: The UI demonstrated consistency across different resolutions as follow:

image


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.

Successful upon testing Evidence: The game was left on for an hour and then tried to pick up inventory: Attempted to collect items:

image

after using all the items:

image


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.