home *** CD-ROM | disk | FTP | other *** search
- SAMPLE.TXT
-
- This file documents the MSTest 1.00 sample programs. Section I lists the
- samples directories and their contents, along with a brief description of
- each file. Section II provides a more in-depth description of each sample
- program, including required files and additional instructions needed for
- running each sample and the descriptive header from each sample file.
-
- ===============================================================================
- Section I
- ===============================================================================
-
-
- Dir Files Description
- -------------------------------------------------------------------------------
- \DOCS Documentation samples directory
-
- CLIPTEST.MST FastTest clipboard testing sample script
- DLGTEST.MST FastTest dialog testing sample script
- FILETEST.MST FastTest file I/O testing sample script
- FTEST1.MST FastTest generic sample script
- KEYTEST.MST FastTest key testing sending sample script
- LOGDISK.MST FastTest disk file logging sample script
- LOGSCRN.MST FastTest viewport logging sample script
- MENUTEST.MST FastTest menu testing sample script
- MOUSTEST.MST FastTest mouse action testing sample script
- SPECKEYS.MST FastTest 'special keys' sending sample
- STARTAPP.MST FastText example of starting an application
- TESTCTRL.MST TESTCTRL routines sample script
- TESTDLGS.MST TESTDLGS routines sample script
- TESTEVNT.MST TESTEVNT routines sample script
- TESTSCRN.MST TESTSCRN routines sample script
- WINTEST.MST FastTest window control sample script
-
- \GENERAL
-
-
- MYOWN.INC Include library of routines sample script
- MYFUNCS.MST Library of functions used by MYOWN.INC
- FXSTATIC.MST Script that will insert the STATIC
- keyword for SUBs and FUNCTIONs in your scripts
- TUTOR.MST Sample script demonstrating a variety of tests
-
- \TRAPS
-
- CAUSERIP.MST Script used by RIPTRAP.MST to generate a RIP
- CWTRAP.C C source for CWTRAP.DLL
- CWTRAP.DEF Module definition file for CWTRAP.DLL
- CWTRAP.DLL DLL used for the CWTRAP.MST sample
- CWTRAP.MST CWTrap sample script
- LIBENTRY.ASM Assembly routine needed to build sample DLLs
- MAKEDLLS.MAK Makefile for building trap sample DLLs
- NP.EXE Special notepad version needed for SAVEUAE.MST
- RIPTRAP.C C source for RIPTRAP.DLL
- RIPTRAP.DEF Module definition file for RIPTRAP.DLL
- RIPTRAP.DLL DLL used for the TRAPRIP.MST sample
- SAVEUAE.MST Script showing NP.EXE UAE really occurs
- SAVEUAE2.MST Script showing trap of NP.EXE UAE
- TRAPRIP.MST RIPTrap sample script
-
- \TSTSUITE
-
- DRIVER.MST Driver script for Test suite example
- DRIVER.FTS FastTest version of DRIVER.MST
- TESTDIRS.DAT Data file used by DRIVER.MST
- TSTSUITE.INC Include file used by test scripts
- TSTSUITE.FTI FastTest version of TSTSUITE.INC
-
- \TSTSUITE\EDIT Edit menu tests for test suite example
-
- EDITMENU.MST Edit menu test script
- EDITMENU.FTS FastTest version of EDITMENU.MST
-
- \TSTSUITE\FILE File menu tests for test suite example
-
- FILEMENU.MST File menu test script
- FILEMENU.FTS FastTest version of FILEMENU.MST
-
- \TSTSUITE\SRCH Search menu tests for test suite example
-
- FILEMENU.MST Search menu test script
- FILEMENU.FTS FastTest version of SRCHMENU.MST
-
-
- ===============================================================================
- Section II
- ===============================================================================
-
- 1. Documentation Samples
-
- These samples are the disk versions of some of the sample programs in the
- MSTest documentation. Each of these samples is self-contained; just load the
- desired script file and run it to see the sample.
-
- '************************** CLIPTEST.MST *********************************
- 'Demonstrates: The capability of the Windows Calculator to send data
- ' to the clipboard correctly.
- '
- 'Required Files: FASTTEST.INC, CALC.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '************************** DLGTEST.MST **********************************
- 'Demonstrates: The use of some of FastTest's dialog procedures. It
- ' starts the Windows Cardfile accessory and tests various
- ' parts of its dialog boxes.
- '
- 'Required Files: FASTTEST.INC, CARDFILE.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '************************** FILETEST.MST *********************************
- 'Demonstrates: Some of the file-handling procedures of FastTest.
- '
- 'Required Files: FASTTEST.INC, NOTEPAD.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes: Assumes disk is in drive A:
- '
- '************************** FTEST1.MST ***********************************
- 'Demonstrates: FastTest program to test the Windows Notepad accessory
- '
- 'Required Files: FASTTEST.INC, NOTEPAD.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '*********************** KEYTEST.MST *************************************
- 'Demonstrates: Testing the Windows Notepad accessory by starting the
- ' program, typing in some text, saving the file as TEST.TXT,
- ' and exiting.
- '
- 'Required Files: FASTTEST.INC, NOTEPAD.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '*********************** LOGDISK.MST *************************************
- 'Demonstrates: FastTest's procedures to log information to disk.
- '
- 'Required Files: FASTTEST.INC, NOTEPAD.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '*********************** LOGSCRN.MST *************************************
- 'Demonstrates: Logging information to screen.
- '
- 'Required Files: FASTTEST.INC, CALC.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '*********************** MENUTEST.MST ************************************
- 'Demonstrates: Use of FastTest menu procedures.
- '
- 'Required Files: FASTTEST.INC, WRITE.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '*********************** MOUSTEST.MST ************************************
- 'Demonstrates: Some of FastTest's mouse procedures. It starts the
- ' Windows Paintbrush program, maximizes it to full screen,
- ' and draws a "picture" using mouse events.
- '
- 'Required Files: FASTTEST.INC
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '*********************** SPECKEYS.MST ************************************
- 'Demonstrates: Sending special keys to the active window.
- '
- 'Required Files: FASTTEST.INC, NOTEPAD.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes: This program assumes CAPS LOCK is OFF before the program begins.
- '
- '*********************** STARTAPP.MST ************************************
- 'Demonstrates: Starting applications from a test script
- '
- 'Required Files: FASTTEST.INC
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes: This script starts the Windows calculator accessory.
- '
-
- '*********************** TESTCTRL.MST ************************************
- 'Demonstrates: The use of procedures found in the TESTCTRL.DLL Library
- ' provided with Microsoft Test for Windows.
- '
- 'Required Files: MSTEST.INC, TESTCTRL.DLL, CARDFILE.EXE
- '
- 'Uses: TESTCTRL
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes:
- '
- '*********************** TESTDLGS.MST ************************************
- 'Demonstrates: The use of procedures found in the TESTDLGS.DLL Library
- ' provided with Microsoft Test for Windows.
- '
- 'Required Files: MSTEST.INC, TESTDLGS.DLL
- '
- 'Uses: TESTDLGS
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes:
- '
- '*********************** TESTEVNT.MST ************************************
- 'Demonstrates: The use of procedures found in the TESTEVNT.DLL Library
- ' provided with Microsoft Test for Windows.
- '
- 'Required Files: MSTEST.INC, TESTEVNT.DLL, TESTCTRL.DLL
- '
- 'Uses: TESTEVNT, TESTCTRL (Window procedures)
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes:
- '
- '*********************** TESTSCRN.MST ************************************
- 'Demonstrates: The use of procedures found in the TESTScrn.DLL Library
- ' provided with Microsoft Test for Windows. This program
- ' starts the Windows Calculator accessory, saves three
- ' window images to the disk, and then compares the images
- ' with each other.
- '
- 'Required Files: MSTEST.INC, TESTSCRN.DLL, CALC.EXE
- '
- 'Uses: TESTSCRN
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes:
- '
- '*********************** WINTEST.MST *************************************
- 'Demonstrates: Some of FastTest's windowing procedures. It starts the
- ' Windows Paintbrush program and changes the size, location
- ' and maximized status of the window.
- '
- 'Required Files: FASTTEST.INC, NOTEPAD.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- **************************************************************************
-
-
- 2. General Samples:
-
- i. MYOWN.INC and MYFUNCS.MST demonstrate a method for using an include file
- (in this case MYOWN.INC) to include a small library of string processing
- functions (MYFUNCS.MST) in your MSTest scripts.
-
- ii. MSTest requires the use of the STATIC clause in any SUB or FUNCTION
- statement. Although all SUBs and FUNCTIONs in MSTest version 1.00 are
- STATIC by default, using the STATIC keyword insures forward compatibility
- with future versions of MSTest. FXSTATIC.MST is supplied for users with
- existing scripts that do not have the required STATIC clause on their SUB
- or FUNCTION statements, and will process a script file and automatically
- add the STATIC clause to all SUBs and FUNCTIONs in the script.
- FXSTATIC.MST also demonstrates calling the "Common Dialog" routines in
- COMMDLG.DLL.
-
- iii. TUTOR.MST is a sample that demonstrates several general TESTCTRL,
- TESTEVNT and TESTSCRN functions by testing the Windows Write program.
- This program can be loaded and run by itself.
-
- '******************************* MYOWN.INC *********************************
- 'Demonstrates: This include file contains the function declarations for the
- ' custom-built functions in MFUNCS.MST.
- '
- 'Required Files: MFUNCTS.MST, MSTEST.INC
- '
- 'Uses:
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes: $INCLUDE this file into your scripts and it will automatically include
- ' the functions in MYFUNCS.MST with the appropriate setup.
- '
- ' This file should be placed in your MSTest INCLUDE subdirectory. To add
- ' your own custom-built function or subroutine, define your function/sub
- ' in this file and don't forget to declare it in MYOWN.INC.
- '
- '******************************* MYFUNCS.MST *********************************
- 'Demonstrates: This file is a small library of custom-built functions. To use
- ' these functions, the calling script must include the MYOWN.INC
- ' file.
- '
- 'Required Files: MYOWN.INC
- '
- 'Uses:
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes: This file should be placed in your MSTest INCLUDE subdirectory. To add
- ' your own custom-built function or subroutine, define your function/sub
- ' in this file and don't forget to declare it in MYOWN.INC.
- '
- '******************************* FXSTATIC.MST *********************************
- 'Demonstrates: This sample will search through an MSTest script and insure that
- ' the STATIC keyword appears at the end of each SUB or FUNCTION.
- '
- 'Required Files: COMMDLG.DLL, MSTEST.INC
- '
- 'Uses:
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes:
- '
- '******************************** TUTOR.MST **********************************
- 'Demonstrates: This sample will test several components of the Windows WRITE.EXE.
- '
- 'Required Files: MSTEST.INC, WRITE.EXE
- '
- 'Uses: TESTSCRN, TESTCTRL, TESTEVENT.
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes: Assumes WRITE.EXE is in the PATH. This example also creates a screen
- ' image file (TUTOR.WTS) to demonstrate TESTSCRN.
- '
- '******************************************************************************
-
-
-
- 3. Trap Samples
-
-
- In order to run either the CWTRAP or RIPTRAP samples, the appropriate DLL
- must be either in the current directory, the same directory as TESTDRVR.EXE,
- or on the PATH.
-
- i. CWTrap - this script uses the CWTRAP.DLL to trap a Windows 'Create Window'
- event. Note that this trap sample will only work for Windows applications
- that set their window title at the time the window is created. Since many
- Windows application delay setting their window title until after
- processing their WM_CREATE message, this trap may not work for all windows
- apps.
-
- ii. RIPTrap - TRAPRIP.MST demonstrates trapping a Windows application that
- fatalExits (RIPs). This sample requires that you be running Windows 3.1
- with the debug kernel loaded. Run TRAPRIP.MST, and it will execute
- CAUSERIP.MST to demonstrate a RIP trap.
-
- iii. UAETrap - SAVEUAE.MST and SAVEUAE2.MST demonstrate trapping a Windows
- "Unrecoverable Application Error" (UAE) and saving your work when the
- UAE occurs. Run SAVEUAE.MST to verify that the program NP.EXE really
- does result in a UAE, then run SAVEUAE2.MST to see an example of
- trapping the UAE.
-
- '************************** CWTRAP.MST *********************************
- 'Demonstrates: Trapping a Windows 'Create Window' event from a MSTest
- ' script
- '
- 'Required Files: CWTRAP.DLL, TESTDRVR.EXE
- '
- 'Uses:
- '
- 'Complexity Level: ADVANCED
- '
- 'Notes: This script uses the CWTRAP.DLL to trap a Windows 'Create Window'
- ' event. CWTRAP.DLL must be in the current directory, in the
- ' same directory as TESTDRVR.EXE, or on the PATH to be found.
- ' Note that this trap sample will only work for Windows
- ' applications that set their window title at the time the window
- ' is created. Since many Windows application delay setting their
- ' window title until after processing their WM_CREATE message, this
- ' trap may not work for all windows apps.
- '
- '************************** TRAPRIP.MST *********************************
- 'Demonstrates: Trapping a Windows RIP from a MSTest script
- '
- 'Required Files: RIPTRAP.DLL, TESTDRVR.EXE, TOOLHELP.DLL
- '
- 'Uses: CAUSERIP.MST
- '
- 'Complexity Level: ADVANCED
- '
- 'Notes: This script uses the RIPTRAP.DLL to trap a Windows FatalExit
- ' call. CWTRAP.DLL must be in the current directory, in the
- ' same directory as TESTDRVR.EXE, or on the PATH to be found.
- '
- ' NOTE!: You must be running Windows 3.1 with the debug kernel
- ' installed for this script to run. You must have the Windows
- ' 3.1 SDK to install the debug kernel.
- '
- ' FatalExit is a Windows function which should only be called by an
- ' application when it wants to inform a debugger (such as CodeView)
- ' that a fatal event has occurred. However, Windows itself will
- ' call FatalExit if you have the Windows debug kernel installed and
- ' certain problems occur with your application. An example is if an
- ' invalid handle is passed to one of the Windows API.
- '
- ' If you are not in a debugger, this causes the RIP information to
- ' be displayed to a debug terminal, and prompts the user for a
- ' response. The result is that the test suite is stopped.
- ' Therefore, you may wish to trap FatalExit so that a test suite can
- ' continue.
- '
- '************************** CAUSERIP.MST *********************************
- 'Demonstrates: Trapping a Windows RIP from a MSTest script
- '
- 'Required Files: RIPTRAP.DLL, TOOLHELP.DLL
- '
- 'Uses:
- '
- 'Complexity Level: ADVANCED
- '
- 'Notes: This script simply calls the Windows FatalExit function, which
- ' causes a RIP.
- '
- 'NOTE!: Do not run this script by itself. This script should be run by
- ' TRAPRIP.MST. Load and run TRAPRIP.MST to execute this sample
- ' program.
- '
- ' FatalExit is a Windows function which should only be called by an
- ' application when it wants to inform a debugger (such as CodeView)
- ' that a fatal event has occurred. However, Windows itself will
- ' call FatalExit if you have the Windows debug kernel installed and
- ' certain problems occur with your application. An example is if an
- ' invalid handle is passed to one of the Windows API.
- '
- ' If you are not in a debugger, this causes the RIP information to
- ' be displayed to a debug terminal, and prompts the user for a
- ' response. The result is that the test suite is stopped.
- ' Therefore, you may wish to trap FatalExit so that a test suite can
- ' continue.
- '
- '************************** SAVEUAE.MST *********************************
- 'Demonstrates: Trapping a Windows UAE from a MSTest script
- '
- 'Required Files: NP.EXE, TOOLHELP.DLL
- '
- 'Uses: TESTDRVR.EXE built in UAE trap
- '
- 'Complexity Level: ADVANCED
- '
- 'Notes: This script runs an invalid version of Windows NotePad, NP.EXE
- ' (which is provided with MSTest for use with this sample and
- ' should be in the current directory) to demonstrate that this
- ' application causes a UAE. After verifying that the application
- ' will cause a UAE, run SAVEUAE2.MST to see an example of trapping
- ' the UAE.
- '
- '************************** SAVEUAE2.MST ********************************
- 'Demonstrates: Trapping a Windows UAE from a MSTest script
- '
- 'Required Files: NP.EXE, TOOLHELP.DLL
- '
- 'Uses: TESTDRVR.EXE built in UAETrap
- '
- 'Complexity Level: ADVANCED
- '
- 'Notes: This script runs an invalid version of Windows Notepad, NP.EXE
- ' (which is provided with MSTest for use with this sample and
- ' should be in the current directory) to demonstrate that this
- ' application causes a UAE, and that the UAE can be trapped using
- ' the builtin UAETrap from TESTDRVR.EXE.
- '
- '************************************************************************
-
-
-
- 4. Test Suite samples
-
- The test suite sample demonstrates an organization of test suites as well
- as a driver script that uses FileList processing to automate running the
- suites. The example uses Windows Notepad, and tests several features of the
- File, Edit, and Search menus. To see the entire set of suites, run DRIVER.MST
- from the TSTSUITE directory. A master log file will be written in the
- TSTSUITE directory, and each suite will write a specific results file in its
- own directory.
-
- There is also a FastTest version of each script (.FTS) and include file
- (.FTI) used in the TSTSUITE example.
-
- '******************************** DRIVER.MST *********************************
- 'Demonstrates: A sample test suite driver script - uses file list processing,
- ' error trapping, and transaction logging.
- '
- 'Required Files: TESTDRVR.EXE
- '
- 'Uses: TESTDRVR.EXE
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes: Assumes one or more subdirectories containing test scripts exist.
- ' The directory layout for this sample is:
- '
- ' TSTSUITE - DRIVER.MST, TSTSUITE.INC, and log file.
- ' TSTSUITE\EDIT - EDITMENU.MST, result file.
- ' TSTSUITE\FILE - FILEMENU.MST, result file.
- ' TSTSUITE\SRCH - SRCHMENU.MST, result file.
- '
- ' Writes log data to LOG_FILE. Individual test scripts run from the
- ' driver will write detailed results to a result file in their directory.
- '
- '******************************* TSTSUITE.INC *********************************
- 'Demonstrates: A sample include file for multiple test scripts in a suite
- '
- 'Required Files: none
- '
- 'Uses: TESTEVNT.DLL, TESTCTRL.DLL
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes: Assumes DLLs and target application (NOTEPAD.EXE) are in the PATH, and
- ' LOG_FILE is in parent directory.
- '
- '******************************** DRIVER.FTS *********************************
- 'Demonstrates: A sample FASTTEST test suite driver script - uses file list
- ' processing.
- '
- 'Required Files: FASTTEST.INC
- '
- 'Uses: FASTTEST.INC
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes: Assumes one or more subdirectories containing test scripts exist.
- ' The directory layout for this sample is:
- '
- ' TSTSUITE - DRIVER.FTS, TSTSUITE.FTI, and log file.
- ' TSTSUITE\EDIT - EDITMENU.FTS, result file.
- ' TSTSUITE\FILE - FILEMENU.FTS, result file.
- ' TSTSUITE\SRCH - SRCHMENU.FTS, result file.
- '
- ' Writes log data to LOG_FILE. Individual test scripts run from the
- ' driver will write detailed results to a result file in their directory.
- '
- '******************************** TSTSUITE.FTI ********************************
- 'Demonstrates: A sample include file for multiple FASTTEST test scripts in a
- ' suite
- '
- 'Required Files: FASTTEST.INC
- '
- 'Uses: FASTTEST.INC
- '
- 'Complexity Level: INTERMEDIATE
- '
- 'Notes: Assumes target application (NOTEPAD.EXE) is in the PATH and
- ' LOG_FILE is in parent directory.
- '
- '******************************************************************************
-
-