Game Development Reference
In-Depth Information
The same test code generation approach can be applied to test flow diagrams. In this case,
test code is associated with each state, event, and action. Once the paths are generated,
substitute the test code for each primitive to compose the equivalent automated test.
A TFD excerpt for the piñata bashing test might look like Figure 16.3.
Figure 16.3 TFD excerpt for piñata bashing test.
The TFD design principles raise some different questions than the previous combina-
torial test. Once the piñata is bashed, what happens if you try to bash it again, creating
a “loop�? flow at the PiñataBroken_MoneyUp state? Is there a way to repair the piñata so it
is no longer broken, creating a flow back to the Skill10_Money0 state? As with combina-
torial test code generation, you just need to update the design, add new test code for
added or changed elements, and regenerate the test paths. Moving or removing existing
flows will not cost you anything in terms of new coding. In fact, it's also “free�? to add
new flows to the diagram that use primitives that already have their test code defined.
Summary
Game test automation is a hotly debated topic in the game industry. Some believe that
all aspects of testing should be automated, while others say that, apart from certain
specific automated testing, using human testers can cost less and have less of a negative
impact on the development process. There are, however, clear potential advantages to
be gained from automating your test process. It can save many person-hours, lead
to better game quality, and be more efficient than manual testing.
Although at present test automation is typically employed in the later stages of devel-
opment, there is a strong argument for starting as early as possible and automating
testing of game code throughout the development cycle.
If you are considering large-scale deployment of test automation, you need to realize
it is a long-term investment that will fundamentally alter how your company creates
games. Implementing any degree of automated testing will require the full support of
your management. It will also be vital to have strong foundations in place that govern
all aspects of your testing program before you begin to automate.
 
Search WWH ::




Custom Search