I want to test my "engine" for a game, the engine generates xml messages for each run of the game , bellow there is a simplistic form of it. My method now is to take the xml each time, "parse" it, check the values i want with java(the game engine which generates the ticket is also in java), first i make an object almost with the same structure as the xml message and after for each message i do the checks, when i want to take statistics from all messages (millions per test) i have some public static variables to keep everything i want.
My question now is , is out there any faster or ready solution for this kind of testing ??
<?xml version='1.0' encoding='UTF-8' ?>
< myCar="4" track="4" level="8"/>
<params opponents="18,7,3,21,1,2,9" levels="5,7,4,8,6,5,6" startpo="8"/>
<games>
<game>
<counter i="1" crash="3" turn="4"/>
<counter i="2" crash="0" turn="12"/>
.
.
<counter i="9" crash="3" turn="10"/>
<counter i="10" crash="0" turn="3" miniGame="2" win="0" r="5.5" p="99" />
.
.
<counter i="50" crash="18" turn="2"/>
</game>
<aftergame>
<counter="b1" ball="4" wins="0" />
<counter="b2" ball="5" wins="0" />
<counter="b3" ball="3" wins="0" />
<counter="b4" ball="5" wins="0" />
<counter="b5" ball="5" wins="1" />
<counter="b6" ball="2" wins="0" />
</aftergame>
</games>
The checks i do is no duplicates at the cars, or that a win is indeed a win, ratio of when an after game is shown , or statistics pere level that the average turn is "this" and stuff like that
Thanks