While recording a test all the goals entered by the user and the activities of the Trinc-Prolog inference engine are stored. Goals can be entered one after another by the user. For a test to be repeatable N-times and to reproduce the same results each time it is best to start recording a test by loading the program source code, then execute one or more goals to test the program. Just before finishing the test close the modules that were necessary and then press the button to stop recording. Such a recorded test can be executed N-times because it opens and closes the modules it needs, i.e. after the test has finished Trinc-Prolog is in the same state as it was before the test.
Opening and closing of the modules can be done with the Modules window or with predicates like consult/3. |
After pressing the button 'Record' the 'Record test' dialog is displayed:
![]() |
If Overwrite testoutput of old test is checked then an existing test is replayed but the existing" testoutput (stored in the test script) is overwritten with the current output. An existing test can be extended if Stop recording test at the end is not checked. After an existing test was overwritten it is possible to enter more goals because Trinc-Prolog stays in the record mode with this option on.
In the dialog 'Record test' there is the option to Record windows events, if this option is checked the input events of the mouse and keyboard are also recorded. By recording these events it is possible to create test scripts to automate testing of Windows programs.
If windows events are recorded then there is the choice when to start recording these events. Events can recorded immediately or when the key combination SHIFT + SPACEBAR is detected. Recording of events can be toggled on or off by pressing SHIFT + SPACEBAR.
It is important when recording Windows events that the same Window controls get the keyboard focus each time the test is replayed or else keyboard events are possibly send to the incorrect control. This can be done by selecting the control with the mouse before any keys are pressed.