A | B | C | D | E | F | G | H | |
---|---|---|---|---|---|---|---|---|
1 | Game Tests | |||||||
2 | Test Group | TestID | TestName | Linked Requirement | Description | Assertions | Time (ms) | Success |
3 | CollegeTests | 1.0 | collegeExists | UR_COMPETING_COLLEGES | Call the spawn method of GameManager to create the colleges as it would in the game | Ensure there are more than 3 colleges and that they are all alive. | 41 | Passed |
4 | 1.1 | collegeFires | UR_HOSTILE_BUILDING_COMBAT | Create a college, get the current cannon ball that will be shot next, shoot the cannonn ball | Ensure cannonball fires by checking its in a different place after firing to where it started. | 34 | Passed | |
5 | 1.2 | collegeIsCaptured | UR_HOSTILE_COLLEGE_CAPTURE | Create a player and a college, kill the college | Ensure college changes faction when captured. | 46 | Passed | |
6 | 1.3 | displacementFromShip | Create a College and a Player. Check that the displacement is Zero. Move the player (10,10) and make sure that the displacement changes correctly. | Ensures that the college is correctly displaced from the player before and after movement. | 44 | Passed | ||
7 | GameStatesTests | 2.0 | gameStart | UR_GAME_INIT, FR_PLUNDER_TRACKING, FR_XP_TRACKING, FR_PLAYER_AMMO, FR_PLAYER_HEALTH | Uses the regular difficulty to spawn the game, then checks that the game spawns in the correct state with the correct attributes for plater, ship and colleges including their position, health, ammo, faction and plunder | Assertions to ensure all initial that Player, Pirate, Faction, College and Ship values are as expected. | 87 | Passed |
8 | 2.1 | winGame | UR_GAME_WIN, UR_QUEST_PROGRESS | The quests are created and the player wins once there are no quests left to complete | Ensure that the player only wins when all of the quests are completed. | 39 | Passed | |
9 | 2.2 | loseGame | UR_GAME_LOSE | Checks that the player takes damage and dies to lose the game | Ensure that the player only loses after taking more damage than their total health. | 45 | Passed | |
10 | 2.3 | gameDifficulty | UR_DFCLTY_LVL, FR_DFCLTY_CHANGE, FR_DFCLTY_DFRNCE | Checks that all options for game difficulty are valid and spawn correctly | Makes sure that the game applies difficulty correctly, as well as having correctly defaulting at start or invalid input. | 49 | Passed | |
11 | ObstacleTests | 3.0 | obstacleDamage | UR_OBSTACLE_ENCOUNTER, FR_OBSTACLE_HIT, FR_PLAYER_DAMAGE | Create a player and a trigger and contact obstacle, move the player to be in the same place as the obstacle and ensure damage is taken. | Make sure that the player takes damage after colliding with both trigger and non trigger obstacles but not before | 138 | Passed |
12 | 3.1 | weatherDamage | UR_WEATHER_ENCOUNTER, FR_WEATHER_HIT, FR_PLAYER_DAMAGE | Create player and weather objects, set the weather position to the same as the player and check damage is dealt to the player. | Ensure that player health lost after moving through weather but not before. | 71 | Passed | |
13 | PlayerTests | 4.0 | playerProgressTasks | UR_QUEST_PROGRESS, FR_QUEST_OBJECTIVE, FR_QUEST_TRACKING | Create the player and quests, create the quests, complete the quests and check they are marked as completed. | Ensure that quests are only shown as complete after completion, for both LocateQuest and KillQuest. | 44 | Passed |
14 | 4.1 | playerPlunder | FR_PLUNDER_TRACKING, FR_PLUNDER_UPDATE, UR_EARN_PLUNDER | Create the player, verify the starting plunder, create a college and quest to kill the college, complete the quest and ensure the player gains loot. Then create a chest and make the player pick it up and ensure that loot is given to the player. | Ensure player starts with 0 loot and gains loot after completing both KillQuest and LocateQuest. | 38 | Passed | |
15 | 4.2 | playerPoints | FR_XP_TRACKING, FR_XP_UPDATE, FR_XP_UPDATE, UR_EARN_XP | Create the player, create the college and quest to jill it, ensure that once the quest is completed, the player gains points and check the player gains points over time. | Ensure player starts with 0 points and gains points after completing both KillQuest and LocateQuest. | 3230 | Passed | |
16 | PowerUpTests | 5.0 | powerUpApply | UR_POWER_UP, FR_POWER_UP | Create a power up for each type of power up in the settings file and systematically apply each one to the player and check it functions as expected | Uses method powerUpTest to run many asserts on many different PowerUp types, covering a total of 66 asserts. | 213 | Passed |
17 | 5.1 | powerUpPickup | UR_POWER_UP, FR_POWER_UP | Create the player and a power up to pick up, set them to the same position and make sure the pwoerup is applied. | Ensure the PowerUpPickup applies on collision, but also not beforehand. | 54 | Passed | |
18 | 5.2 | buyPowerUp | UR_POWER_UP, UR_SPEND_PLUNDER, FR_PLUNDER_SPEND, FR_POWER_UP | Create the player, check that the `buypowerup` method works by creating a pwoerup, buyin it and making sure the effect is applied | Ensure that the PowerUp is applied when bought. | 66 | Passed | |
19 | 5.3 | powerUpDuration | UR_POWER_UP, FR_POWER_UP | Create a player and a power up with a duration and ensure that the powerup is applied for only the duration it is meant to be applied for. | Ensure that a PowerUp lasts the right amount of time, not ending early, and removing effects when done | 1145 | Passed | |
20 | ProjectileTests | 6.0 | projectileAmmoExists | FR_PLAYER_AMMO | Check the settings for the ammo amount | Ensure ammo is present. | 32 | Passed |
21 | 6.1 | projectileFires | FR_PLAYER_FIRE, UR_FIRE_WEAPONS, UR_BULLET_TRAVEL | Create a ship and shot its cannon and check the cannonball is visible | Ensure that the cannonball fires correctly, as well as is only visible while firing. | 44 | Passed | |
22 | 6.2 | projectileHitsBuildings | UR_HOSTILE_BUILDING_COMBAT | Create the college and buildings, shoot a cannon towards the building from an ally and ensure it doesnt take damage and shoot from an enemy and ensure it does | Ensure that projectiles only damage colleges from opposing factions. | 42 | Passed | |
23 | 6.3 | projectileHitsShips | UR_HOSTILE_SHIP_ENCOUNTER, UR_SHIP_COMBAT | Create ally and enemy ships, shoot from ally to ally and ensure it foesnt take damage. Shoot from enemy and ensure it deals damage | Ensure that projectiles only damage ships from opposing factions. | 33 | Passed | |
24 | 6.4 | projectileRemovedOnCollision | FR_BULLET_TRAVEL | Check that when a projectile is shot and collides with something, it is removed off the screen. | Ensure that the cannonball moves after being shot and is then moved off-screen upon collision. | 34 | Passed | |
25 | SaveManagerTests | 7.0 | saveGame | UR_GAME_SAVE, FR_SAVE_GAME_STATE | Create an instance of the game and then save it and check the prefs are done | Ensure that preferences are not empty after saving. | 56 | Passed |
26 | 7.1 | loadGame | UR_GAME_SAVE, FR_LOAD_GAME | Initialise the game with a Player and College. Damage the Player and kill the College and then Save. Reinitialise without loading save and check values are default. Then initialise by loading the save and check values are what was applied before. | Ensure that a college killed in a previous save is alive in a new save, but dead in a loaded save. Make sure the same logic applies to the player taking damage. | 54 | Passed | |
27 | ShipTests | 8.0 | shipMove | UR_SHIP_CONTROL | Test that different velocities are all correctly applies to a Ship using a RigidBody. | Uses the method moveTest to perform many asserts on one velocity direction, for all cardinal velocities. | 3370 | Passed |
28 | 8.1 | shipFires | UR_FIRE_WEAPONS, FR_PLAYER_FIRE | Create a Ship and CannonBall and then have the Ship shoot the CannonBall. | Ensures ship cannonball fires. | 33 | Passed | |
29 | 8.2 | NPCShipsChangeStates | UR_HOSTILE_SHIP_ENCOUNTER, FR_HOSTILE_AI | Spawn an NPCShip and a Player. Make the Player the target of the NPCShip. NPCShip kills the Player and should then wander. A new Player is spawned, which the NPCShip should then aggro. The NPCShip should lose aggro after the Player leaves it's range. | Ensures ship can only attack when there is a target, which is in range, and the ship is in attack mode. Ensures the ship changes between modes under appropriate stimuli. | 48 | Passed | |
30 | 8.3 | killShip | UR_HOSTILE_SHIP_ENCOUNTER | Spawn a Ship and then kill it, making sure this occurs correctly. | Ensures ship spawns alive, and is killed after .kill(). | 44 | Passed | |
31 | 8.4 | NPCShipShoots | UR_HOSTILE_SHIP_ENCOUNTER | Create a Player and NPCShip, and have test that the NPCShip attacks the player correctly. | Ensures the cannonball moves. | 1049 | Passed | |
32 | AITests | 9.0 | nodePosition | FR_FRIENDLY_AI, FR_HOSTILE_AI | Initialise a Node, ensure it initialised correctly, then update the Node, and ensure it updates correctly. | Ensures that node position values initialise and set correctly. | 32 | Passed |
33 | 9.1 | pathNodes | FR_FRIENDLY_AI, FR_HOSTILE_AI | Create two Nodes, form a Path from them, and then check the Path initialised correctly | Ensures that nodes within path initialise correctly. | 46 | Passed | |
34 | 9.2 | pathCost | FR_FRIENDLY_AI, FR_HOSTILE_AI | Initialise a Path and check that the cost is correct. | Ensures that path cost is correct value. | 26 | Passed | |
35 | ||||||||
36 | Utility Tests | |||||||
37 | Test Group | Test Name | Time (ms) | Success | ||||
38 | QueueFIFOTests | element() | 25 | Passed | ||||
39 | retainAll() | 3 | Passed | |||||
40 | addAll() | 1 | Passed | |||||
41 | removeObject() | 2 | Passed | |||||
42 | contains() | 0 | Passed | |||||
43 | toT1Array() | 2 | Passed | |||||
44 | removeIndex() | 1 | Passed | |||||
45 | add() | 0 | Passed | |||||
46 | pop() | 0 | Passed | |||||
47 | peek() | 3 | Passed | |||||
48 | poll() | 1 | Passed | |||||
49 | size() | 1 | Passed | |||||
50 | clear() | 2 | Passed | |||||
51 | offer() | 0 | Passed | |||||
52 | containsAll() | 1 | Passed | |||||
53 | removeAll() | 1 | Passed | |||||
54 | isEmpty() | 1 | Passed | |||||
55 | toObjectArray() | 1 | Passed | |||||
56 | UtilitiesTests | scaleTwoVectors() | 0 | Passed | ||||
57 | scaleFourPoints() | 0 | Passed | |||||
58 | angleToVector() | 1 | Passed | |||||
59 | contains() | 1 | Passed | |||||
60 | vectorToAngle() | 1 | Passed | |||||
61 | floor() | 1 | Passed | |||||
62 | round() | 1 | Passed | |||||
63 | angleBetween() | 1 | Passed | |||||
64 | distanceToTiles() | 1 | Passed | |||||
65 | checkProximity() | 1 | Passed | |||||
66 | tilesToDistance() | 0 | Passed |