Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

230 lines
7.9 KiB

'******************************************************************************
' AddBook.mst
' Ronald Rohr
' June 11, 1996
' Status = Pre-Test Design Review, Pre-Code Review
' Version = 0.1
' This test verifies the TAPI components of Parsons Technology Address Book 3.0
'
' A description of the Test Cases Can be found in TCM, Server: lostpup,
' Database: TAPICASES, Tree: Applications\AddressBook.
' Logon with ID & Password = Tapicase (read only privlages)
' Parsons Technology Address Book 3.0 is required to run this test.
'******************************************************************************
'$INCLUDE 'declares.inc'
option base 0
Const TEST_SCRIPT_TITLE = "Parsons Technology Address Book 3.0 / TAPI Test" 'Test Script Name
Const TEST_SCRIPT_VERSION = "6/11/96" 'Test Script Version
Const TIMEOUT = 3 'Timeout value for MSTest APIs
Global Test_Logfile as string 'Results Log File Name
Global w_flags as long 'used with WFndWnd function
w_flags = FW_ALL OR FW_CHILDOK OR FW_DIALOGOK OR FW_EXIST _
OR FW_NOERROR OR FW_FOCUS OR FW_NOCASE
'$include 'Tapilog.inc' 'required for all common file I/O procedures
'$include 'AB_API.INC' 'Constants, Globals and Type declarations
'$include 'AB.inc' 'Functions and Constants used by TAPI_BVT.MST
''$include 'HT_TEMP.INC' 'location of functions under construction
dim rtn as long 'Generic long return
dim count as short 'Generic count variable
dim tempstr as string 'Generic string
dim hDlg as long 'Generic dialog handle
dim hCtrl as long 'Generic control handle
dim ErrorMessage as string 'Error Message string for On Error Procedure
dim ModemName as string 'Name of Modem currently installed
dim hAB as long 'Handle to Address Book window
dim Prop_hCtrl(2) as long ' Array of handles to the Dialing Properties child controls
dim Prop_CtrlID (2) as long ' Array My Location Tab child controls IDs
dim ML_hCtrl (15) as long ' Array of handles to the My Location Tab child controls
dim ML_CtrlID (15) as long ' Array My Location Tab child controls IDs
dim hProperties as long
dim Duvall as location
dim hParentTab as long, hMyLocTab as long, hTelDrvTab as long
'Dialing Properties child control IDs
Prop_CtrlID(DP_OKcmd) = &h00000001&
Prop_CtrlID(DP_CANCELcmd) = &h00000002&
Prop_CtrlID(DP_APPLYcmd) = &h00003021&
'My Location Tab child control IDs
ML_CtrlID(NEW_cmd) = &h00001389&
ML_CtrlID(REMOVE_cmd) = &h0000138B&
ML_CtrlID(CHANGE_cmd) = &h0000138C&
ML_CtrlID(LOCATION_cbo) = &h00001388&
ML_CtrlID(COUNTRY_cbo) = &h0000040F&
ML_CtrlID(AREA_txt) = &h0000040E&
ML_CtrlID(LOCAL_txt) = &h0000040C&
ML_CtrlID(LONG_txt) = &h0000040D&
ML_CtrlID(CARD_chk) = &h0000138D&
ML_CtrlID(DIAL_AS_chk) = &h0000138A&
ML_CtrlID(WAIT_chk) = &h0000138E&
ML_CtrlID(WAITStr_cbo) = &h00001390&
ML_CtrlID(TONE_opt) = &h000017A3&
ML_CtrlID(PULSE_opt) = &h000017A2&
ML_CtrlID(ADDRESS_lbl) = &h00002329&
ML_CtrlID(NUMBER_lbl) = &h00002328&
on error goto ErrorHandler
on end EndTest
' Bounds Checker can only be run from a system that has Visual Test installed
' otherwise a run time error will occur.
' The Bounds Checker binaries cannot be redistributed.
' NUMEGA should only be defined when running in the VT environment.
'$ifdef NUMEGA
on BoundsCheckerNotify (NULL) Call BoundsChkHandler
'$endif 'NUMEGA
'$ifdef DEBUG_TEST_SCRIPT
viewport on
viewport clear
'$endif 'DEBUG_TEST_SCRIPT
'*** Test Initialization
SetDefaultWaitTimeout (5)
TotalScenarios = 0
Test_Logfile = TESTMODE$
CurrentLoggingLevel = DetailCase
SetLogFileName
rtn = StartLog (DELETE_LOGFILE, TEST_SCRIPT_TITLE)
SetWndTimeout () 'Set timeouts for all platforms
'***************************************************************************************
' Verify Modem set otherwise stop test
'***************************************************************************************
'$ifdef AlreadyValidated
rtn = DetectModem
if rtn = FALSE then
tempstr = "This Test Will Terminate" + CRLF + CRLF + _
"Please Set up Modem on this computer" + CRLF + _
"prior to running the TAPI BVT"
WritelogItem ("" , tempstr )
Statusbox tempstr, 0,0,0,0, TRUE, TRUE
Sleep 6
Stop 'Stop the test
endif
'***************************************************************************************
' Set Dialing Properties locaton
'***************************************************************************************
hProperties = Call_Dialing_Prop (hParentTab, hMyLocTab, hTelDrvTab)
GetChildhandles (hProperties, Prop_hCtrl, Prop_CtrlID)
GetChildhandles (hMyLocTab, ML_hCtrl, ML_CtrlID)
Duvall.Location = "Duvall"
Duvall.AreaCode = "206"
Duvall.Country = "United States of America"
Duvall.LocalAccess = "9"
Duvall.LongAccess = "8"
Duvall.CardSet = UNCHECKED
Duvall.WaitSet = UNCHECKED
Duvall.ToneSet = TRUE
Duvall.PulseSet = FALSE
EditLocationInfo ( Duvall, (ML_hCtrl))
'Close Dialing Properties
WButtonClick (_hwnd(Prop_hCtrl(DP_OKcmd)))
'$endif 'AlreadyValidated
'***************************************************************************************
' Start Address Book
'***************************************************************************************
rtn = StartAddBook (hAB)
teststring.TC_Num = 1
teststring.Expect_Res = "Address Book handle"
teststring.Actual_Res = hex$(hAB)
TotalTestCases = TotalTestCases + 1
if hAB > 0 then
teststring.Apprase = "Pass"
else
teststring.Apprase = "FAIL *"
FailedTestCases = FailedTestCases + 1
WritelogItem ("Invalid Address Book handle" , CRLF + "The test will terminate ")
end
endif
LogCase (teststring)
'***************************************************************************************
' Create Entry
'***************************************************************************************
rtn = CreatePhoneEntry (hAB)
'***************************************************************************************
' Dial Entry
'***************************************************************************************
rtn = DialNumber( hAB, (ML_CtrlID) )
'$ifdef NotyetValidated
'$endif 'NotyetValidated
'******************************************************************************
'*** END OF TEST *
'******************************************************************************
WSetActWnd (hAB)
WMenuSelect (MADDRESS + "\" + MDELETE)
w_flags = FW_ALL OR FW_CHILDOK OR FW_DIALOGOK OR FW_EXIST _
OR FW_NOERROR OR FW_FOCUS OR FW_NOCASE 'OR FW_PART
hDlg = WFndWndC (AB_CAPTION, DIALOG_CLASS, w_flags, WTimeout)
'if the window is found then close it
If hDlg > 0 then
hCtrl = GetDlgItem (hDlg, YES_ID)
WButtonClick (_hwnd(hCtrl))
endif
WMenuSelect (MFILE + "\" + MEXIT)
END 'Hyper Term Test
'****************************** On Error Routine ******************************
ErrorHandler:
ErrorMessage = "Unexpected error in the Address Book/TAPI Test: " + CRLF + CRLF + _
"Error: " + error$ + CRLF + _
"Error #:" + str$(Err) + CRLF + _
"Line #: " + str$(Erl) + CRLF + _
"File: " + Erf + CRLF + CRLF + _
"Attempt to continue?"
'$IFDEF DEBUG_TEST_SCRIPT
if Msgbox(ErrorMessage, MB_ICONEXCLAMATION or MB_YESNO) = IDYES then
resume next
else
Stop
endif
'$ELSE
Statusbox "Run Time error detected, Test will terminate", _
0,0,0,0, TRUE, TRUE
Sleep 4
WritelogItem ("" , ErrorMessage)
Stop
'$ENDIF 'DEBUG_TEST_SCRIPT
'******************************************************************************