Game Development Reference
In-Depth Information
Figure 17.2 Region1 and Region2 images captured during recording.
Once the test is recorded, you can make changes to it. For example, you can add an in-
line comment to any of the commands in the file by entering a semicolon followed by
your comment text. Here's a comment explaining the three Esc keys:
Keys(“[Esc][Esc][Esc]�?, 0.0, 1.04, 1.07) ;Skip splash screens
You may also find that you want to delete commands from the test after you've already
made a recording. You can, for example, remove an accidental key press or mouse click
that is not meant to be part of the test. These can be removed by deleting the offending
line from the test file. If you want to be more cautious, you can comment out any line
by inserting a leading semicolon.
If you left something out and want to add it without going through the capture
process all over again, the same commands available from the Record Bar can be typed
directly into your test file, or altered to fit your needs. Appendix B of the Vermont
HighTest User's Guide lists the available commands along with details of their syntax
and parameters.
VHT also provides control and function statements. These can be used to create
chunks of automation that you can add to your scripts without having to recapture
those sequences. You can even use variables to alter the number of times you perform
various operations during the test, such as multiple mouse button clicks. Details of
these commands are provided in Appendix A of the VHT User's Guide.
If you are so inclined, you can create automated tests entirely from scratch with the
commands available to you. If you are savvy with the automated command syntax,
you could even automate the automation by using your tests to generate text files that
can be imported and run by the automated test tool.
Test editing is also useful for automating a set of tests that only vary slightly from one
another. Capture the “master�? test normally, and then make copies of the recorded file.
Edit the recordings as desired. This can save a lot of time versus trying to repeat the
same capture process over and over again for each new test.
The Run (F12) option in the playback menu runs the test that is open in the VHT editor
or prompts you to select a test file if none is open. Running the test produces a log file.
Search WWH ::

Custom Search