Feature tests are stored in text files inside the
The names shouldn't contain spaces or other daft characters because the files get read into the game using console variables and commands, and a lot of characters have special meanings on the command line, in .cfg files, when typing into the in-game console and so on.
Stick to letters and numbers and you'll be fine. The files should have the extension .xml although you should leave that off when referring to the files when loading and running the tests in the game.
Feature Test Instructions
TrySpawnPlayer: Tell the player to spawn in (if not spawned in already):
SetItem: Make the player select a particular item from his inventory:
SetAmmo: Changes the ammo count of the current selected item. "ammo" is the ammo count on the inventory and "clip" is the number of rounds on the clip:
SetSuitMode: Put the player into a particular suit mode:
MovePlayerToOtherEntity: Move a player next to another entity in the level:
OverrideButtonInput_Press: Send local player's input handler a button press message:
OverrideButtonInput_Release: Send local player's input handler a button release message:
OverrideAnalogInput: Send local player's input handler a change to an analogue input value:
DoConsoleCommand: Execute a console command:
DoMenuCommand: Execute a menu command (actions normally activated by clicking buttons etc. in the front-end or in-game menu):
Code Coverage Checkpoint Instructions
WatchCCCPoint: Start counting the number of times a code coverage checkpoint is hit:
ResetCCCPointHitCounters: Reset how many times each code coverage checkpoint is hit to 0:
CheckNumCCCPointHits: Verify the number of times a code coverage checkpoint is hit is a specific number (fail feature test if not):
SetResponseToHittingCCCPoint: Mark hitting a specific code coverage checkpoint as having a particular response (restartTest / restartSubroutine / failTest / passTest / expectedNext):
Wait: Wait for given period of time:
WaitSingleFrame: Wait until a frame has gone by:
WaitUntilPlayerIsAlive: Wait until a player (or an entire set of players) is alive:
WaitUntilHitAllExpectedCCCPoints: Wait until all code coverage checkpoints marked as "expected" have been hit:
WaitUntilPlayerAimingAt: Wait until a player (or an entire set of players) has a particular target type:
RunFeatureTest: Pause execution or this feature test, run another, then continue with this one if that one succeeds:
RunFlowGraphFeatureTests: Run all flowgraph feature tests which exist in the loaded level:
Fail: Fail the current feature test:
Elements of a Feature Tester XML file
The top level XML tag. Can include a <Settings> section and multiple <Tests> sections.
Reserved for future use. For now, leave it empty.
Defines a set of feature tests with the specified set name. Should include zero or more <FeatureTest> sections.
Defines a feature test. Should include zero or more instructions.