Game Testing All in One (Game Development Series)
In this application of test trees, the tests have already been developed and documented. The tree is used each time the game team sends a new release to the testers. The test lead can determine which tests to execute based on which defect fixes or new abilities were introduced in the release. Such an organization could also reflect the way the game itself is structured.
Take, for example, a tree of tests for Warhammer 40,000: Dawn of War , which is a realtime simulation (RTS) game for the PC. In this game up to eight players can compete against one another and/or computer AI opponents. Players control and develop their own race of warriors, each of which has its own distinct military units, weapons, structures, and vehicles. Games are won according to various victory conditions such as taking control of a location, defending a location for a given amount of time, or completely eliminating enemy forces.
At a high level, the Dawn of War tests can be organized into game Option tests, User Interface tests, Game Mode tests, Race-specific tests, and Chat capability tests. The Option tests can be grouped into Graphics, Sound, or Controls options. The User Interface tests can be divided between the Game Screen UI and the in-game Camera Movement. There are three major Game Modes: Campaign, Skirmish, and Multiplayer. Four player-selectable Races are available: Chaos, Eldar, Orks, and Space Marines. The Chat capability is available when connected via LAN, Online, or Direct Link. Figure 13.1 shows these top two levels of organization organized as a tree.
Figure 13.1: Dawn of War two-level test case tree.
Note ‚ | It's okay to draw your trees in either top-down or left-to-right fashion. They are drawn from left to right in this chapter simply to fit the orientation of the pages in this book. |
During game development, each bug fix can affect one or more areas of the game. With the test case tree you can easily target which tests to run by finding them under the tree nodes related to the parts of the game affected by the new code. Some fixes may have to be rechecked at a high level, such as a change in the Chat editor font that applies to all uses of chat. Other fixes may be more specific, such as a change in the way Chat text is passed to the Online server.
It is also possible to go into finer detail to make a more precise selection of tests. For example, the Skirmish Game Mode tests could be further organized by which Map is used, how many Players are active in the match, which Race is chosen by the player, what Game Options are selected, and which Win Conditions are applied. Figure 13.2 shows the further breakdown of the Skirmish branch.
Figure 13.2: Skirmish Game Mode test case sub-tree added.
Revealing the additional details of the Skirmish mode is important because it exposes another set of tests that should be run if changes are made to any game assets or functionality that is specific to the Races. Whether your tests are stored in a regular directory system or a formal configuration management system you can organize them to match the hierarchy of game functions. That will make it easy to find the tests you want to run once you map them to the code changes in each release that is to be tested .