Skip to content

General Mobs Testing Plan

meganroxburgh edited this page Aug 29, 2023 · 15 revisions

To test each task of the General Mobs feature, a mix of JUnit tests and other tests during gameplay have been implemented.

Mob Base Entity Class

TEXT HERE

Xeno Grunt Designs and Animations

TEXT HERE

Mob Interactions with Towers/Projectiles

As the projectile shooting has not yet been incorporated with the mob entities, a print statement has been included which occurs whenever the ShootTask is initiated. This task prints to the terminal and is initiated in the start() function of the class.

  @Override
  public void start() {
    super.start();
    System.out.println(this.message);
  }

During gameplay, if the window is minimised and not on full-screen mode, these print statements can be seen whenever the player moves within range of the Xeno Mob Entity. In future work, the projectiles will be implemented with this class so that the mob shoots projectiles at a specified target. The expected print message is given below, where target is the Entity moving within range of the mob (in this case, the player).

this.message = "Shoot Task Activated " + target;

Mob Movement & Spawning

When attempting to test the movement, since the getDirection() function was a private helper function, it was unable to be called and tested within a JUnit test. Consequently, the functionality of mob movement was verified visually.

Screenshot 2023-08-29 134638
Clone this wiki locally