Share via


Automated Test Harness Window

The Visual FoxPro Automated Test Harness Window makes it possible for you to record and play back Mouse and Keyboard events in your Visual FoxPro applications.

  • Scripts Tab
    This tab makes it possible for you to view and work with existing scripts that were recorded earlier with the Test Harness. You can edit any script by highlighting it in the grid and then clicking the Edit the test script toolbar button or selecting the Edit Script menu item. One or more scripts can be played back at a time. Click checkboxes next to the scripts you want to play back and then click the Play the script toolbar button or select the Play menu item. The following options are available in this tab:
    • Scripts grid

      Displays all recorded scripts. Information for a script is displayed on a line including pre and postscripts that get executed before and after the main script. The main script uses the event log. Items checked in the first column are used when deleting or playing back scripts. The Edit script function only applies to the current row highlighted in the grid.

    • Delete button

      Deletes scripts selected (first column checked) in the grid.

  • Options Tab
    This tab has optional settings you can select for both recording and playback. The following options are available in this tab:
    • Overwrite the existing script

      If checked, an existing script of the same name will automatically be overwritten without prompting for confirmation during recording.

    • Always launch new VFP Window

      If checked, recording will always start with a new instance of Visual FoxPro.

    • Validate startup window before playback

      If checked, the startup window is validated against the recorded window. If it doesn't match, it will prompt with an error. The test will fail if an unexpected window appears or an error occurs.

    • Check for presence of each object

      If checked, the object associated with every event will be verified before playback. For example, if the keypress event is recorded on a textbox, the presence of the same object name is verified before playing back the event. An error will be displayed if the object does not exist.

    • Check for program error

      This option is used to report an error in the testing application. If checked and there is an error during playback, the error will be logged in the test log. The test results can be viewed in the Test Log tab.

    • Run count

      Specifies the number of times each script selected in the Scripts tab is run during play back.

    • Delay between events

      Makes it possible for you to specify a specific delay (milliseconds) between events during playback.

    • On script failure

      Provides error handling options if a problem occurs during script playback. You can abort the entire script, skip only the event that failed or continue playing back the script after retrying the failed event.

  • Test Log
    This tab has details on results from test runs (playbacks). The following options are available in this tab:
    • Test Log grid

      Displays useful information on recently played-back scripts. The memory usage is the difference in the memory before and after the test run.

    • Delete button

      Deletes the selected test log.

  • Coverage Log
    You can set coverage logging by using the settings in the Coverage Log tab. During playback, it will turn on coverage logging and save the log in the file specified.
    • Turn on coverage logging during playback

      If checked, creates a coverage log during playback of a script.

    • Overwrite the log if file exists

      If checked, automatically overwrites the log if it already exists without confirmation.

    • View Log button

      Displays a coverage log for the test if one exists.

    • Coverage Profiler button

      Invokes the Coverage Profiler, which will load the coverage log if it exists; otherwise, it will prompt for a log.

See Also

Using the Automated Test Harness | Testing and Debugging Applications | Debugging and Error Handling | Accessibility Browser Window | Coverage Profiler Application