-
Notifications
You must be signed in to change notification settings - Fork 1
Item and Inventory Test Plan
Mittun Sudhahar edited this page Oct 13, 2024
·
23 revisions
The documentation details the test plan for both items (Abstract Item) and Inventory For the results and iterations based on user testing, please refer to User Testing
- The base
AbstractItem
class is extensively unit tested for each method. - The base
Inventory
class (and henceInventoryInterface
) is also extensively unit tested per method. This includes testing for saving inventory state. - The
ConsumableItem
class is extensively unit tested for each method. - The
AbstractFood
and it's concrete subclasses are tested method-wise. - The
AbstractPotion
and it's concrete subclasses are tested method-wise. - The
ItemFactory
andItemProximityTask
are tested. In particular, we check that an item triggers the creation a chat overlay when a player is positioned close to it, and does not when far away. - The
Foods
class is extensively test for each food item. More specifically, each item is tested that it actually adds the right amount of hunger to the player stats. - The
PlayerInventoryDisplay
class are tested using mockito through unit test cases
1. Functionality Testing:
To test the functionality and UI of the inventory and items we have a planned procedure to test the game feature implemented:
- Run game
- Walk towards items until (expected value is to have a pop-up screen informing player can pick up the item by pressing "P" once player is in pick up range of the item)
- Click on "E" to open the inventory window and click on a few slots (slots will have a click effect but will not do anything)
- Hover mouse over any item in the inventory (expected value is to have a pop-up screen with information on the items description and the items quantity)
- Press "E" again to get back to main screen and on the right side of the screen their should be an inventory hotbar with the top 5 inventory slots
- Hover mouse over any item on the hotbar (expected value is to have a pop-up screen with information on the items description and the items quantity)
- Click on item in the hotbar (expected value is for the item to disappear and the item effect should then be implemented)
- Access inventory through combat by clicking on the items button. (Expected value is for the inventory to appear with all the items in inventory)
- Use items during Combat (Expected outcome is for the action of using an item become a turn base event)
- Attempt to use defense or attack potions in main game area (Expected outcome: dialogue box will appear stating item can only be used in combat and inventory will prevent player from using it)
2. Usability Testing:
- Check that the Inventory display is clear with each item slot being separated properly.
- Test that items are displayed clearly on screen and the pop-up when moving close to the item provides a helpful message.
- Ensure the item uses are considered as a combat move so it will have a turn base effect with the enemy
3. Performance Testing:
- Ensure the inventory is toggled without lag, and that items can be rendered and picked up without lag.
- Ensure all slots in the UI of inventory can fit