Game Development Reference
In-Depth Information
Figure 16.2 Bash testing combinatorial table excerpt.
Each of the test values has a small piece of test code associated with it.
Starting Money = 0 is coded as
set_data avatar money 0
Skill = 10 is coded as
set_data avatar skill 10
Item to Bash = Piñata is coded with two lines:
use_object piñata bash
wait_until piñata broken
log_message Money should go up after breaking the piñata
Finally, the code that checks the result is
log_dat avatar money
Using basic test design principles, you can imagine what might be in the rest of the
test table. Besides a skill of 10, what about 0 or the maximum possible skill? What if
the player's money is maximum before breaking the piñata—is the money lost or does
it lie on the ground for other players to pick up? What other items besides the piñata
can be broken to provide money to the player? These questions may already be
answered in the game's design or they might not. All it takes is a few extra pieces of
code to incorporate additional test values. For example, the code for 0 skill would not
be much different from the code for skill = 10 :
set_data avatar skill 0
You can generate code for each row in your combinatorial table by substituting the
test code for each value that appears in the row. If a new “bashable�? item is introduced
in an expansion set, just add it to the test table, define new code for it, and regenerate
the automated tests.
Search WWH ::

Custom Search