Skip to content

Sprint 2 Test Plan

LJ edited this page Sep 12, 2024 · 23 revisions

Test Objectives:

The main functionalities that were tested in this sprint were:

  • Banana Projectile Attack functionality
  • Enemy combat cut screen

Testing Approach

The following test styles were used during the testing process for Sprint 2

  • Execution
  • Pass/fail (JUnit assertions)
  • Visual Inspection

Test Areas

Enemy Combat Cut Scene Test

Visual testing to verify that the cut-scene for enemies before combat is triggering correctly, displaying and formatting correctly as well.

Chicken Combat Cut Scene Test

Bear Combat Cut Scene Test

Frog Combat Cut Scene Test

The syntax isn't easy to remember if you don't use it often, but here you go, with the link you provided:

Projectile Factory Tests

Tests the creation of projectiles, which is currently only the banana, to ensure they are instantiated correctly with the necessary components.

Methods

  • TestBananaCreation(): Tests the creation of a banana projectile.
  • TestBananaIsEntity(): Verifies that the created banana is an instance of the Entity class.
  • TestBananaHasComponents(): Ensures that the banana has all required components, such as PhysicsComponent, PhysicsMovementComponent, BananaAnimationController, ProjectileAttackComponent, HitboxComponent, and ColliderComponent.

Touch Attack Component Tests

Tests the TouchAttackComponent to verify that it correctly handles collision-based attack logic.

Methods

View Touch Attack Component Tests

  • shouldNotAttackOtherLayer(): Verifies that the attack does not occur if the target entity is on a different physics layer.
  • shouldNotAttackWithoutCombatComponent(): Ensures that the attack is ignored if the target entity does not have a CombatStatsComponent.

Shoot Task Tests

Tests the ShootTask to verify its behaviour for firing projectiles when within range and the correct wait time has elapsed.

Methods

  • shouldShootWhenInRangeAndWaitTimeElapsed(): Verifies that the ShootTask fires a projectile (triggers the "FireBanana" event) when the target is within range and the wait time has passed.
  • shouldShootOnlyWhenInDistance(): Ensures that the ShootTask only fires when the target is within a specified distance range and does not shoot when the target is too far away.
Clone this wiki locally