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.
Share/Bookmark

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.
Share/Bookmark

Window Restoration Commands

The following commands record the sizes and positions of open windows so that SQA Robot can restore the testing environment during playback. They also indicate the windows within which user actions occur.

StartSaveWindowPostions
EndSaveWindowPostions


These statements tell SQA Robot that,during playback, the intervening Window SetContext, Window MoveTo, and Window SetPostion commands are for windows restoration only. All playback timings default are set to zero to process these commands as quickly as possible. If any commands fails between StartSaveWindowPostions and EndSaveWindowPositions, that failure is reported to the test log as a warning, not a script command failure.

Window SetContext
Window SetPostion


The Window SetContext statement defines the context window for subsequent test cases and user actions, and Window SetPostion indicates the postion, size, and status of that context window. These statements can vary, depending on the window within which user actions occur.

During recording, SQA Robot saves the postions of windows that are normal,minimized, or maximized if Auto Record Window Size is checked in the Recording Options dialog box. It does not save the positions of hidden windows. During playback, SQA Robot restores the windows to their positions when the test procedure was recoreded. SQA Robot writes messages to the test log for any windows it cannot find on playback.
Share/Bookmark

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.
Share/Bookmark

GUI Procedure Script Structure

A typical GUI procedure has four major sections:

1. Initialzation commands.

2. Window restoration commands (optional).

3. User action and test case commands.

4. Closing commands.
Share/Bookmark

Test Procedure

A Test Procedure is an SQA Basic or Visual Basic script that you record with SQA Robot. When you record a test Procedure, SQA Robot automatically captures user activities and stores them as a series of SQA Basics commands. Test Procedure script files have the same name as the test procedure ID, but with a .REC file extension. Test procedure files are stored in the \Repository\Project\Procs subdirectory.

If SQA basic is your scripting language, the test procedure script is displayed in a child window called the test procedure window. SQA Robot does not display the test procedure window if Visual Basic is your scripting language.

When you play back the test procedure, SQA Robot executes the activities you recorded. There are two types of test Procedures.

1. GUI Procedures: These contain the user's recorded GUI actions, such as keystrokes and mouse clicks. In regression tests GUI procedures also contain one or more GUI test cases.

2. Virtual user Procedures: These contain the user's recorded HTTP requests to a Web Server.

Note: You can only record virtual user procedure if you have Virtual User Recording installed.
Share/Bookmark

Displaying Toolbars

To manually display or hide a toolbar:

1. Choose WindowToolbars.

2. Click to select and check or uncheck the toolbar.

3. Choose OK to display or hide the toolbar.

To manually display or hide a toolbar from the toolbar popup menu:

1. Point to any toolbar, but not within a button, and press the right mouse button. SQA Robot displays the toolbar popup menu.

2. Choose a toolbar to display or hide that toolbar. Currently displayed toolbars are checked.
Share/Bookmark

Anchored and Floating Toolbars

The default standard and debug toolbars are anchored within the SQA Robot main window below the menu bar, and the default Record and Insert toolbars float outside of the main window. However, you can drag an anchored toolbar from within the SQA Robot window and make it a floating toolbar,which you can position and resize independently of the main window.

You can also drag a floating toolbar and anchor it inside of the SQA Robot window. Floating toolbars are always on top of all other windows. This ensures that they are never hidden while you record test procedures and work with the application-under-test.

Creating Anchored and Floating Toolbars

To change an anchored toolbar to a floating toolbar:

1. Point to the toolbar,but not within any button.

2. Drag the toolbar to a location outside of the SQA Robot window.

To Anchor a Floating toolbar inside of the SQA Robot window

1. Point to the toolbar's title bar or any space not within a button.

2. Drag the toolbar to the titlebar,menubar,or an existing toolbar within the SQA Robot main window.
Share/Bookmark

Variable Window

The Variable Window displays all variables values for three hierarchical levels of SQA basic source code:

1. Global variables that apply to all files (normally defined in the SQA basic header file)

2. Modular variables that apply to the entire .REC file.

3. Procedural variables that apply to individual procedures within the .REC file (normally the Main procudure)

Choose WindowVariables to display the Variable Window.

For each level, the variables window displays either an expanded view showing all variables for that level (indicated by a minus sign) or a collapsed view (indicated by a plus sign). To change from one view to the other, double-click the line with the plus or minus sign. SQA Robot updates the values in the variables window as you debug. This lets you set breakpoints or single step while debugging and examine the changing values of variables at critical points in the test procedure.
Share/Bookmark

Console Window

The Console window displays compilation results for all SQA Basics scripts compiled in the last operation. Line numbers are enclosed in parentheses to indicate lines in the script with warnings and errors. Choose WindowConsole to display the Console window. SQA Robot also displays the ConsoleWindow whenever it compiles test procedures prior to playback or debugging.

Use Edit Menu commands to take advantage of Console window line numbers and error messages.

Go to Line: Displays a dialog box prompting you for a line number. The SQA Robot editor jumps to the specified line.

Next Error: The SQA Robot editor jumps to and highlights in red the line containing the next compile error.

Previous Error: The SQA Robot editor jumps to and highlights in red the line containing the previous compile error.
Share/Bookmark

SQA Robot Toolbars

SQA Robot four default tool bars with buttons for choosing frequently used menu commands. Active buttons are displayed in color, and inactive buttons are grayed. If you point to a toolbar button and pause. SQA Robot displays a window ToolTip with the command name of that button.

Standard: Record,play back,edit, and debug test procedure scripts, insert new recorded actions into existing scripts, starts other SQA Suite applications.
Record: Pause,stop, view the SQA Robot main window,and display the Insert toolbar while recording.
Insert: Insert test cases, wait states, and commnents into the test procedure script while recording or editing.
Debug: Debug and edit recorded test procedure scripts, start other SQA Suite products,and start online help.
Share/Bookmark