Skip to content

PlanetScreen Testing Plan

Henry Batt edited this page Oct 18, 2023 · 4 revisions

Introduction:

The PlanetScreen is a vital part of the core game design being the actual Screen displayed to the end user and containing all relevant information about each planet (level) and their Game Areas. As such it is essential to ensure it behaves as expected each time without fail.

Test Plan:

Objective:

The objective is the validate that the PlanetScreen is behaving as expected by ensuring the following:

  • When a PlanetScreen is constructed it is setup correctly.
  • The next planet in the gameplay chain is correct.
  • The starting game area is correct.
  • Switching between different game areas behaves correctly.

Methodology:

SetUp (BeforeEach):

  • Mock up a game to use.
  • Construct the PlanetScreen for the Planet "Earth".

Test Case 1: testConstructionName

Objective: To ensure that when "Earth" is created, it gets its name and config set correctly.

Steps:

  • Verify that the name of the planet and subsequent config file is correct.

Test Case 2 testNextPlanet:

Objective: To ensure the the next planet after "Earth" is correctly set and applied.

Steps:

  • Load in the config for the current planet and get its expected next planet.
  • Verify that the PlanetScreen's next planet name aligns with the expected next planet.

Test Case 3: testStartGameArea

Objective: To ensure that when a PlanetScreen is created, the starting game area loaded is correct.

Steps:

  • Verify that the starting area name is set to the expected. (Default: "main_area")

Test Case 4: testSetInvalidGameArea

Objective: To ensure that attempting to switch to a non-existing game area fails.

Steps:

  • Attempt to switch to a game area that does not exist.
  • Verify that it failed to switch correctly.

Dependencies:

  • The PlanetScreen testing is dependent on the config files for the "Earth" level existing to load in.
Clone this wiki locally