Testing Plan: Interface - UQdeco2800/2021-studio-6 GitHub Wiki
Title Screen
As the title screen is primarily about the layout of the UI elements on the screen, we decided that unit testing will have less benefit than periodic manual testing.
The following videos illustrate the periodic manual testing process:
- Text size adjustment on smaller window sizes - https://youtu.be/RFzj8Z3-CHA
- Layout and aspect ratio when constrained by the height of the window - https://youtu.be/_FA33iguUCM
- Layout and aspect ratio when constrained by the width of the window - https://youtu.be/gFzHLpG3F4E
- Music, rollover, and click sounds - https://youtu.be/xhQAcvPFNYE
- Disposal and recreation of menu - https://youtu.be/l6mBkVzo3xM
HUD
The HUD consists primarily of UI elements and therefore it was decided that manually testing through visual inspection would be the most benefical, i.e. checking the green health bars on the left center are visible in game.
Dialogue Boxes
Manual/debug testing
The dialogue box is a UI element which benefits from visually testing the component. This involves creating and displaying a dialogue box through debug commands ("printDialogue TEXT;TEXT2" and "pd") created and tweaking the visual parameters (width, height, fonts, backgrounds etc.) to suit. The window is also resized to ensure that the dialogue box remains readable and visually appealing at different window sizes.
Automated testing
Unit tests were created for the Dialogue component to test if the right dialogue is being returned for each iteration. Unit test file: source/core/src/test/com/deco2800/game/components/dialoguebox/DialogueTest.java