-
Notifications
You must be signed in to change notification settings - Fork 4
UItesting
aadityayadav17 edited this page Oct 17, 2023
·
3 revisions
Creating unit tests for UI elements is inefficient as most of them do not have many functions to mock. Most of these elements display objects using tables and AddComponent
methods.
So to overcome this we approach manual testing of such elements. This involves going through each and every task in the code to ensure that the elements are working as intended.
Some of the general guidelines we followed to ensure testing are:
- Images do not stretch beyond the screen size.
- Images that fill up spaces are not stretched so much that they lose clarity(eg. backgrounds), or in other words, ensure image resolution is appropriate for the case.
- Buttons should not overlap each other.
- Buttons should do what they are actually intended for.
- Images and buttons show up at the intended places.
- Ensuring additions to the game do not ruin visual aesthetics.
- Maintaining a similar theme across all elements used.
These general guidelines helped us verify that everything was working as intended.
Making these guidelines the standard we got the following result for each external UI screen:
- Background appears in place.
- Sprites of celestial bodies appear in place.
- Background & sprite remain in sync even after resolution change and minimising and maximising.
- Buttons appear in place and work as intended.
- Background appears in place.
- Sprites of planets (levels) appear in place.
- Background & sprite remain in sync even after resolution change and minimising and maximising.
- Unlocked planets are clikable.
- Planet description & borders comes up when mouse is hovered over them.
- To verify level lock mechanism, win & lose conditions were modified in
MainGameScreen
, to trigger one of these conditions, and therefore trigger one ofWinningScreen
,NextLevelScreen
andLoosingScreen
, as soon as the level was clicked. This also proved to be a time effective approach.
- Background appears in place.
- Background remain in sync even after resolution change and minimising and maximising.
- Buttons appear in place and work as intended.
- Background image shows up as intended
- Buttons placement is correct and works properly
- Background image shows up as intended
- Buttons placement is correct and works properly
- Background image show up as intended
- Buttons placement is correct and works properly
- Text animation shows as intended.
- Background image is in place.
- All images show up as intended.
- Text on each image shows up in place.
- Buttons(Continue, Skip) appear in place and work as intended.
- Game intro description text appears in place.
- All four images of engineers, Towers, Aliens and currency appear in place.
- Text accompanying the images appears in place.
- All 4 buttons (Tutorial, Back, Mobs, HowToPlay) Appear in place and work as intended.
- Background appears in place.
- Game component descriptions appear in place.
- All Buttons(Continue, Continue, Back) appear in place and work as intended.
- Towers can be placed when the mobs are paused as intended.
- Elements match the main game as intended.
- Game component description image appears in place.
- Background appears in place.
- Buttons (up, back) appear in place and work as intended.
- Background appears in place.
- Images of Mobs appear in place.
- Text accompanying each mobimage appears in place.
- Buttons(Left, Back, Tower, BossMob) appear in place and work as intended.
- Background appears in place.
- Images of BossMobs appear in place.
- Text accompanying each image appears in place.
- Buttons(Up, Back) appear in place and work as intended.
- Background appears in place.
- Images of Towers appear in place.
- Text accompanying each image appears in place.
- Buttons(left, Back) appear in place and work as intended.