ABCDEFGH
1
Game Tests
2
Test Group
TestID
TestNameLinked RequirementDescriptionAssertions
Time (ms)
Success
3
CollegeTests1.0collegeExistsUR_COMPETING_COLLEGESCall the spawn method of GameManager to create the colleges as it would in the gameEnsure there are more than 3 colleges and that they are all alive.41Passed
4
1.1collegeFiresUR_HOSTILE_BUILDING_COMBATCreate 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. 34Passed
5
1.2collegeIsCapturedUR_HOSTILE_COLLEGE_CAPTURECreate a player and a college, kill the college Ensure college changes faction when captured.46Passed
6
1.3displacementFromShipCreate 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.44Passed
7
GameStatesTests2.0gameStartUR_GAME_INIT, FR_PLUNDER_TRACKING, FR_XP_TRACKING, FR_PLAYER_AMMO, FR_PLAYER_HEALTHUses 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 plunderAssertions to ensure all initial that Player, Pirate, Faction, College and Ship values are as expected.87Passed
8
2.1winGameUR_GAME_WIN, UR_QUEST_PROGRESSThe quests are created and the player wins once there are no quests left to completeEnsure that the player only wins when all of the quests are completed.39Passed
9
2.2loseGameUR_GAME_LOSEChecks that the player takes damage and dies to lose the gameEnsure that the player only loses after taking more damage than their total health.45Passed
10
2.3gameDifficultyUR_DFCLTY_LVL, FR_DFCLTY_CHANGE, FR_DFCLTY_DFRNCE Checks that all options for game difficulty are valid and spawn correctlyMakes sure that the game applies difficulty correctly, as well as having correctly defaulting at start or invalid input.49Passed
11
ObstacleTests3.0obstacleDamageUR_OBSTACLE_ENCOUNTER, FR_OBSTACLE_HIT, FR_PLAYER_DAMAGECreate 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 before138Passed
12
3.1weatherDamageUR_WEATHER_ENCOUNTER, FR_WEATHER_HIT, FR_PLAYER_DAMAGECreate 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.71Passed
13
PlayerTests4.0playerProgressTasksUR_QUEST_PROGRESS, FR_QUEST_OBJECTIVE, FR_QUEST_TRACKINGCreate 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.44Passed
14
4.1playerPlunderFR_PLUNDER_TRACKING, FR_PLUNDER_UPDATE, UR_EARN_PLUNDERCreate 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.38Passed
15
4.2playerPointsFR_XP_TRACKING, FR_XP_UPDATE, FR_XP_UPDATE, UR_EARN_XPCreate 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.3230Passed
16
PowerUpTests5.0powerUpApplyUR_POWER_UP, FR_POWER_UPCreate 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 expectedUses method powerUpTest to run many asserts on many different PowerUp types, covering a total of 66 asserts.213Passed
17
5.1powerUpPickupUR_POWER_UP, FR_POWER_UPCreate 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.54Passed
18
5.2buyPowerUpUR_POWER_UP, UR_SPEND_PLUNDER, FR_PLUNDER_SPEND, FR_POWER_UPCreate the player, check that the `buypowerup` method works by creating a pwoerup, buyin it and making sure the effect is appliedEnsure that the PowerUp is applied when bought.66Passed
19
5.3powerUpDurationUR_POWER_UP, FR_POWER_UPCreate 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 done1145Passed
20
ProjectileTests6.0projectileAmmoExistsFR_PLAYER_AMMOCheck the settings for the ammo amount Ensure ammo is present.32Passed
21
6.1projectileFiresFR_PLAYER_FIRE, UR_FIRE_WEAPONS, UR_BULLET_TRAVELCreate a ship and shot its cannon and check the cannonball is visibleEnsure that the cannonball fires correctly, as well as is only visible while firing.44Passed
22
6.2projectileHitsBuildingsUR_HOSTILE_BUILDING_COMBATCreate 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 doesEnsure that projectiles only damage colleges from opposing factions.42Passed
23
6.3projectileHitsShipsUR_HOSTILE_SHIP_ENCOUNTER, UR_SHIP_COMBATCreate ally and enemy ships, shoot from ally to ally and ensure it foesnt take damage. Shoot from enemy and ensure it deals damageEnsure that projectiles only damage ships from opposing factions.33Passed
24
6.4
projectileRemovedOnCollision
FR_BULLET_TRAVELCheck 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.34Passed
25
SaveManagerTests7.0saveGameUR_GAME_SAVE, FR_SAVE_GAME_STATECreate an instance of the game and then save it and check the prefs are done Ensure that preferences are not empty after saving.56Passed
26
7.1loadGameUR_GAME_SAVE, FR_LOAD_GAMEInitialise 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.54Passed
27
ShipTests8.0shipMoveUR_SHIP_CONTROLTest 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.3370Passed
28
8.1shipFiresUR_FIRE_WEAPONS, FR_PLAYER_FIRECreate a Ship and CannonBall and then have the Ship shoot the CannonBall.Ensures ship cannonball fires.33Passed
29
8.2NPCShipsChangeStatesUR_HOSTILE_SHIP_ENCOUNTER, FR_HOSTILE_AISpawn 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.48Passed
30
8.3killShipUR_HOSTILE_SHIP_ENCOUNTERSpawn a Ship and then kill it, making sure this occurs correctly.Ensures ship spawns alive, and is killed after .kill().44Passed
31
8.4NPCShipShootsUR_HOSTILE_SHIP_ENCOUNTERCreate a Player and NPCShip, and have test that the NPCShip attacks the player correctly.Ensures the cannonball moves.1049Passed
32
AITests9.0nodePositionFR_FRIENDLY_AI, FR_HOSTILE_AIInitialise a Node, ensure it initialised correctly, then update the Node, and ensure it updates correctly.Ensures that node position values initialise and set correctly.32Passed
33
9.1pathNodesFR_FRIENDLY_AI, FR_HOSTILE_AICreate two Nodes, form a Path from them, and then check the Path initialised correctlyEnsures that nodes within path initialise correctly.46Passed
34
9.2pathCostFR_FRIENDLY_AI, FR_HOSTILE_AIInitialise a Path and check that the cost is correct.Ensures that path cost is correct value.26Passed
35
36
Utility Tests
37
Test GroupTest Name
Time (ms)
Success
38
QueueFIFOTestselement()25Passed
39
retainAll()3Passed
40
addAll()1Passed
41
removeObject()2Passed
42
contains()0Passed
43
toT1Array()2Passed
44
removeIndex()1Passed
45
add()0Passed
46
pop()0Passed
47
peek()3Passed
48
poll()1Passed
49
size()1Passed
50
clear()2Passed
51
offer()0Passed
52
containsAll()1Passed
53
removeAll()1Passed
54
isEmpty()1Passed
55
toObjectArray()1Passed
56
UtilitiesTestsscaleTwoVectors()0Passed
57
scaleFourPoints()0Passed
58
angleToVector()1Passed
59
contains()1Passed
60
vectorToAngle()1Passed
61
floor()1Passed
62
round()1Passed
63
angleBetween()1Passed
64
distanceToTiles()1Passed
65
checkProximity()1Passed
66
tilesToDistance()0Passed