Showing posts with label Commands. Show all posts
Showing posts with label Commands. Show all posts

Tuesday, May 31, 2011

Closing Commands

All GUI procedure scripts must end with the following commands, which terminate the test procedure and reset SQA Robot.
EndPlay

(Visual Basic only) This is a subroutine defined by SQA Robot that terminates playback of a Visual Basic test procedure script.

EndSub

This indicates the end of the Main subroutine

InitPlay,SetProcID, and EndPlay are required by SQA Robot to initilize and terminate playback of Visual Basic scripts. These commands are not required for SQABasic scripts, Which can only be played back from within SQA Robot.

SQA Robot includes the StartSaveWindowPostions and EndSaveWindowPostions commands only if Save Window Positions is checked in the Recording Options dialog box.


View the original article here

User Action and Test Case Commands

User action commands represent the actions you take while recording a GUI procedure. They are not test cases,but represent your actions between test cases. User actions within a window are always preceded in the script by a Window SetContext statement establishing the context window within which the action occur.

PushButton Click, "VBName=SelectOk;VisualText=OK"

User action statement always begin with an object type (Pushbutton,Window,EditBox,etc..) followed by the action applied to it (Click,Resize,VScrollTo,etc..)

Result=WindowTC(CompareMenu,"VBName=Main;VisualText=Mortgage Prequalifier","CaseID=QBPRQ01A")

Test case and wait state functions are preceded by Result variable. A test case funciton corresponds to a test case you insert into the test procedure while recording. During playback,if the test case passes, Result equals 1. If the test case fails Result equals 0.


View the original article here

Initialzation commands

All SQA Robot GUI procedure scripts must begin with the following commands:

Sub Main

This defines the test procedure as subroutine named Main. This is normally the first command in the script and should not be edited.

Dim Results As Integer

This defines the variable Result as an integer variable. SQA Robot returns the value from each test case function in the variable Result. The value for Result is local to the Main subroutine.

Test Procedure Name:Mortgage Prequalifier History

SQA Robot writes two comment lines (which begin with a single quotation mark) in the initialization section of each script. The script tells when the test procedure was recorded, and the second is the text entered as the name (not the ID) of the test procedure.

InitPlay

(Visual Basic only) This is a subroutine defined by SQA Robot that initializes test procedure playback. It must always be the first command in a Visual Basic script.

SetProcId "QBPRQ01"

(Visual Basic only) This is a defined by SQA Robot that identifies the ID of the test procedure. This always follows InitPlay and always precedes any user action commands in a Visual Basic Script.


View the original article here

Web Statistics