Tuesday, August 25, 2009

Limitations of QTP

Limitations to display on QTP Print log window:

We are familiar with Print command in VB Script that is use to display the output lines in Print Log window. This is very similar to printf in C++ and System.out.print commands in Java.

Syntax: Print “text”

QTP Print log (Quick Test Print Log) window can write 1001 lines on it and 1024 characters in a line. So it has array of (1001 X 1024). If you enter more lines the previous lines will be deleted and most recent lines will be displayed. So it can handle 1001*1024= 1,025,024 characters to display at a time.





Limitations to Display on QTP Message dialog window:

We also very much familiar with Msgbox command in VB Script that is use to display output message in Message Dialog Window with ok button.

Syntax: Msgbox “text”

The maximum length of characters Prompt is exactly 1023 characters. But it might depend also on the width of the characters used. If Prompt consists of more than one line, you can separate the lines using a carriage return character (Chr(13)), a line feed character (Chr(10)), or a carriage return/linefeed character combination (Chr(13) & Chr(10)) between each line.

This has been tested with the following code:

Dim Num
Num=RanNumber(1023)
print Num
msgbox Num

Function RanNumber(val)
Dim d
Set d=nothing
Set d = createobject("Scripting.Dictionary")
For i =1 to val
r=RandomNumber (0,9)
d.add i, r
Next
a = d.items 'Get the items.
For i = 0 To d.Count -1 ' Iterate the array.
s = s&a(i)'Create return string.
Next
RanNumber=s
End Function


Tuesday, August 18, 2009

Mercury QuickTest Professional Shortcut Key Reference Card

Mercury QuickTest Professional Shortcut Key Reference Card

File Menu

New > Test CTRL + N
New > Business Component CTRL + SHIFT + N
New > Scripted Component ALT + SHIFT + N
New > Application Area CTRL +Alt + N
Open > Test CTRL + O
Open > Business Component CTRL + SHIFT + O
Open > Application Area CTRL + ALT + O
Save CTRL + S
Export Test to Zip File CTRL + ALT + S
Import Test from Zip File CTRL + ALT + I
Print CTRL + P

Edit Menu

Cut CTRL + X (EV only)
Copy CTRL + C
Paste CTRL + V
Delete DEL
Undo CTRL + Z (EV only)
Redo CTRL + Y (EV only)
Rename Action F2
Find CTRL + F (EV only)
Replace CTRL + H (EV only)
Go To CTRL + G (EV only)
Bookmarks CTRL + B (EV only)
Complete Word CTRL + Space (EV only)
Argument Info CTRL + SHIFT + SPACE (EV only)
Apply “With” To Script CTRL + W (EV only)
Remove “With” Statements CTRL + SHIFT + W (EV only)

Insert Menu

Checkpoint > StandardCheckpoint F12
Output Value > Standard Output Value CTRL + F12
Step > Step Generator F7
New Step F8 OR INS (KV only)
New Step After Block SHIFT + F8 (KV only)
Key: KV = Keyword View
EV = Expert View

Test/Component/Application Area Menu

Record F3
Run F5
Stop F4
Analog Recording CTRL + SHIFT + F4
Low Level Recording CTRL + SHIFT + F3
Step Menu
Object Properties CTRL + ENTER
Value Configuration Options CTRL + F11 on an input value
(KV only)
Output Options CTRL + F11 on an output value
(KV only)

Debug Menu

Pause PAUSE
Step Into F11
Step Over F10
Step Out SHIFT + F11
Insert/Remove Breakpoint F9
Clear All Breakpoints CTRL + SHIFT + F9

Data Table Options

Edit > Cut CTRL + X
Edit > Copy CTRL + C
Edit > Paste CTRL + V
Edit > Clear > Contents CTRL + DEL
Edit > Insert CTRL + I
Edit > Delete CTRL + K
Edit > Fill Right CTRL + R
Edit > Fill Down CTRL + D
Edit > Find CTRL + F
Edit > Replace CTRL + H
Data > Recalc F9
Insert Multi-line Value CTRL + F2 while editing cell
Activate next/previous sheet CTRL + PAGEUP/CTRL + PAGEDOWN

General Options

View Keyword View/Expert View CTRL + TAB
Open context menu for step or Data Table cell SHIFT + F10
or Application key ( )
Expand all branches * [on numeric keypad] (KV only)
Expand branch + [on numeric keypad] (KV only)
Collapse branch - [on numeric keypad] (KV only)


Here is a QTP References Card from Bas M. Dam