Unit tests
Get our executable testing file here. (.jar, ~2.3MB)
Run it by opening your terminal, navigating to the folder where you downloaded the .jar, and entering java -jar teal-duck-all-tests.jar
.
Currently, our test suite runs with 2 errors. These are both due to a single bug that we identified late in development, and did not have time to correct. This bug is identified clearly in our code, and our playtests show that it has no noticable impact during normal gameplay.
Acceptance tests
Much of the functionality of the game is very difficult to display in a unit test, so is most easily tested by playing the game with visual inspection of correct functionality.
The following table provides a list of expected functionality, and how to observe this functionality expressed in the execution of the game.
Unit under test | Procedure | Pass/Fail |
---|---|---|
Quit button exits game | Press 'quit' button, observe if game has exited | Pass |
Settings button enters settings screen | Press 'settings' button, observe if settings screen exited | Pass |
Load game button enters load game menu | Press 'load game' button, observe if load game menu has been entered | Pass |
Back button on settings and load game menus returns to main menu | Enter each menu, press 'back' button, observe if main menu has been re-entered | Pass |
New game button starts a game | Press 'new game' button, observe game has started | Pass |
Buttons can be controlled using keyboard | Use the 'up' and 'down' keys to select different buttons, then press 'enter' key. Observe if correct function has occurred | Pass |
The duck is visible on the screen | Observe if the duck is visible on the screen. | Pass |
The duck looks towards the mouse pointer. | Move the mouse pointer. Observe the duck rotating to face the mouse pointer | Pass |
The player can see their current score. | Observe the score display in the top right corner | Pass |
The player can see his current health | Observe the health display in the top left corner | Pass |
The player can see their sprint meter. | Observe the sprint display in the bottom left corner | Pass |
The player can see their current ammo counter | Observe the ammo display in the bottom right corner | Pass |
The duck's movement is controlled by the player | Press one of the 'wasd' keys. Observe the duck moving in the expected direction | Pass |
The duck's speed can be increased | Hold one of the 'wasd' keys. Intermittently hold the 'left shift' key. Observe the duck's speed increase. | Pass |
The duck can only sprint for a limited time | Sprint with the duck for roughly 7 seconds. Observe sprint forcibly ended. | Pass |
The sprint display shows how long the player may sprint | Sprint with the duck. Observe sprint meter fall. Stop sprinting, observe sprint meter rise. | Pass |
The duck plays an animation during movement | Move the duck. Observe the animation during movement. | Pass |
The duck collides with impassable terrain. | Attempt to move the duck into the walls. Witness stymied attempts. | Pass |
The duck may fire its weapon. | Click somewhere on the screen. Observe the bullet fire, the ammo counter fall. | Pass |
The duck may reload. | Fire the weapon. Press the 'r' key. Observe ammo counter rise again to a maximum of 10. Observe red '!' and ammo display turning red to signify reloading. | Pass |
The duck may obtain more ammunition. | Walk over one of the ammo pickups on the ground. Observe spare ammo counter rise. | Pass |
The duck may damage enemies | Fire the weapon at an enemy. Observe enemy health display decrease. | Pass |
The duck may kill enemies | Fire the weapon at an enemy three times. Observe the enemy's health display turn fully red, and the enemy cease to exist in the game. | Pass |
Upon death, an enemy drops a pickup. | Slaughter multiple enemies. Observe pickups appear in the place of their corpses. | Pass |
The duck loses health on touching an enemy. | Move the duck such that contact occurs with the enemy. Observe health counter decrease, and the duck recoil | Pass |
The duck may regain health. | Take damage from an enemy. Walk over one of the health pickups on the ground. Observe health increase. | Pass |
The player receives score for killing an enemy. | Kill an enemy. Observe score increase. | Pass |
The player receives bonus points for killing multiple enemies within a time span. | Destroy multiple enemies within a few seconds. Observe a 'x2' or higher combo notice, and a greater increase in score. | Pass |
The enemies will move randomly. | Observe an enemy walk in a straight direction until colliding with a wall, then rotating a random angle, and moving again. | Pass |
The enemies will chase a duck it is spotted. | Observe an enemy's 'vision cone'. Walk into it. Observe the enemy stop random movement and chase the duck. | Pass |
The player may escape an enemy. | Move the duck around the corner from an enemy. Observe the enemy's short attention span as it returns to random movement. | Pass |
The player may die. | Take damage from an enemy until health counter reaches zero. Observe game over screen. | Pass |
The player may choose to return to the main menu upon death. | Die. Press the 'return to menu' button. Observe main menu. | Pass |
The player may win the level. | Find a goal tile. Walk onto goal tile. Observe level win screen. | Pass |
The player may continue to move onto the next level. | Win a level. Press the 'continue' button. Observe next level. | Pass |
The player may choose to return to the main menu upon level win. | Win a level. Press the 'save and quit' button. Observe main menu. | Pass |
The player may see their score after winning a level. | Win a level. Observe the 'score' counter on the level win screen. | Pass |
The player may pause the game. | Start the game. Press the 'esc' key. Observe game pause menu. | Pass |
The player may choose to quit to menu during gameplay. | Pause the game. Choose the 'quit to menu' option. Observe main menu. | Pass |
The player may choose to resume the game. | Pause the game. Choose the 'resume' option. Observe resumption of gameplay. | Pass |
The player is notified while assets are being loaded. | Start the game. Observe the asset loading screen | Pass |
Upon completing every level, the player may finish the game. | Win every level. Observe the game win screen. Click the 'finish' button. Observe return to main menu in triumph. | Pass |
Upon colliding with impassable terrain or an enemy, a bullet is removed from the game. | Fire a bullet towards a wall. Observe the bullet not pass through the wall. | Pass |
Game is playable on Windows | Launch game on Windows. Observe game plays correctly. | Pass |
Game is playable on Linux | Launch game on Linux. Observe game plays correctly. | Pass |