Sunday, May 5, 2013

Versions of QTP


Versions of QTP


  QTP 6.5:
To successfully install and run QTP6.5, following minimum system requirements are required :
Computer/Processor:
IBM-PC or compatible with a Pentium® II 266 MHz microprocessor (366 MHz recommended).
Operating System:
Windows® 98 Second Edition, Windows® 2000—Service Pack 3, 
Windows NT® 4.0—Service Pack 6a, 
Windows® Me, or Windows® XP—Service Pack 1.
Memory:
128 MB of RAM (256 MB recommended)
Free Hard Disk Space:
150 MB of free disk space for a compact installation or 200 MB for a typical or complete installation
Browser:
Microsoft Internet Explorer 5.0–6.0.

Supported Environments
QuickTest Professional supports creating, recording, and running tests in the environments described below.

Ø  Standard Windows Applications

1.      Win32 API

2.      MFC

Ø  Visual Basic Applications

                     Visual Basic 6.0

Ø  Browsers

  • Microsoft Internet Explorer 5.01–6.0 (required)
  • Netscape Navigator 4.06–4.7x (optional)
  • Netscape 6.1, Netscape 6.22, and Netscape 6.23 (optional)
  • AOL 5.0 and 6.0 (optional)

ActiveX Grid Controls

In addition to basic support of ActiveX properties and methods, QuickTest Professional supports context-sensitive recording and verification on the following ActiveX Grid controls:



Name
ProgId
FarPoint Spreadsheet 2.5
FPSpread.Spread.1
FarPoint Spreadsheet 3.0
FPSpread.Spread.2
FarPoint Spreadsheet 3.5
FPSpread.Spread.3
FarPoint Spreadsheet 6.0
FPSpread.Spread.4
FarPoint Spreadsheet 3.0 (OLEDB)
FPSpreadADO.fpSpread.2
FarPoint Spreadsheet 3.5 (OLEDB)
FPSpreadADO.fpSpread.3
FarPoint Spreadsheet 6 (OLEDB)
FPSpreadADO.fpSpread.4
Microsoft Grid 1.0
MSGrid.Grid
Microsoft DataBound Grid 5.0
MSDBGrid.DBGrid
Microsoft Flex Grid 6.0
MSFlexGridLib.MSFlexGrid.1
Sheridan Data Grid 2.0
SSDataWidgets.SSDBGridCtrlApt.1
Sheridan Data Grid 3.1
SSDataWidgets.SSDBGridCtrlApt.3
Apex True DataBound Grid 5.0
TrueDBGrid50.TDBGrid
Apex True DataBound Grid 6.0
TrueDBGrid60.TDBGrid
Apex True OLE DB Grid 6.0
TrueOleDBGrid60.TDBGrid

 

ActiveX Calendar Controls

In addition to basic support of ActiveX properties and methods, QuickTest Professional supports context-sensitive recording and verification on the following ActiveX Calendar controls:
Name
ProgId
Microsoft Date and Time Picker Control 6.0 (SP4)
MSComCtl2.DTPicker.2
Microsoft MonthView Control 6.0 (SP4)
MSComCtl2.MonthView.2

 

 

Multimedia Applications

QTP6.5 supports testing on the following multimedia applications:
  • Microsoft Windows MediaPlayer controls, version 6.0 and higher
  • RealPlayer controls supported for Internet Explorer browsers (the controls within applications containing browser controls are not supported)
  • Macromedia Flash 4 or 5 objects that are ActiveX controls in Internet Explorer. You can also test Macromedia Flash 6 clips containing only Flash 4 or 5 commands.

Additional Environments

QuickTest Professional add-ins support other environments such as Java, .NET Windows and Web Forms, SAP solutions, Oracle, Siebel, PeopleSoft, Web Services, and terminal emulator applications. For more information about QuickTest Professional add-ins, contact your sales representative or Mercury Interactive Customer Support.
Note for QuickTest Professional 6.0 and earlier:
Java support and Oracle support are now available as separate add-ins to QuickTest Professional 6.5 and are no longer part of the core product.
QTP 8.0:

System Requirements
To successfully install and run QTP8.0, you need the following minimum system requirements:
Computer/Processor:
IBM-PC or compatible with a Pentium II 266 MHz microprocessor (366 MHz recommended).
Operating System:
Windows 2000-Service Pack 3 or Service Pack 4, Windows XP-Service Pack 1, or Windows 2003 Server.
Memory:
128 MB of RAM (256 MB recommended).
Free Hard Disk Space:
250 MB of free disk space for application files and folders, and an additional 120 MB of free disk space on the system disk (the disk on which the operating system is installed).
After Quick Test Professional is installed, it is recommended to have at least 150 MB free disk space on the system disk for the operating system and Quick Test Professional to run correctly.
Browser:
Microsoft Internet Explorer 5.5 Service Pack 2-6.0. 
 

Supported Add-ins
The following external QuickTest 6.5.x add-ins are supported for use with QuickTest Professional 8.0:
  • Java Add-in 6.5
  • Oracle Add-in 6.5
  • PeopleSoft Add-in 6.5
  • Terminal Emulator Add-in 6.5
  • .NET Add-in 6.5.1
  • SAP solutions Add-in 6.5.1



Note: Siebel Add-in 6.5, the .NET Add-in 6.5, the Add-in for SAP solutions 6.5, or any 6.0 add-ins,cannot be used  with QuickTest Professional 8.0.1
Supported Environments and Programs
QuickTest Professional 8.0 supports creating, recording, and running tests or components using the environments and programs described below.

Ø  Standard Windows Applications

    1.Win32 API

    2.MFC

Ø  Visual Basic Applications

           Visual Basic 6.0
Note: Visual Basic .NET applications are supported by the QuickTest Professional .NET Add-in.

Ø  Browsers

  • Microsoft Internet Explorer 5.5 Service Pack 2-6.0 (required)
  • Netscape 6.1, Netscape 6.22, Netscape 6.23, Netscape 7.02, and Netscape 7.1 (optional)
  • AOL 8.0 and 9.0 (optional)

ActiveX Grid Controls

In addition to basic support of ActiveX properties and methods, QuickTest Professional supports context-sensitive recording and verification on the following ActiveX Grid controls:



Name
ProgId
FarPoint Spreadsheet 2.5
FPSpread.Spread.1
FarPoint Spreadsheet 3.0
FPSpread.Spread.2
FarPoint Spreadsheet 3.5
FPSpread.Spread.3
FarPoint Spreadsheet 6.0
FPSpread.Spread.4
FarPoint Spreadsheet 3.0 (OLEDB)
FPSpreadADO.fpSpread.2
FarPoint Spreadsheet 3.5 (OLEDB)
FPSpreadADO.fpSpread.3
FarPoint Spreadsheet 6 (OLEDB)
FPSpreadADO.fpSpread.4
Microsoft Grid 1.0
MSGrid.Grid
Microsoft DataBound Grid 5.0
MSDBGrid.DBGrid
Microsoft Flex Grid 6.0
MSFlexGridLib.MSFlexGrid.1
Sheridan Data Grid 2.0
SSDataWidgets.SSDBGridCtrlApt.1
Sheridan Data Grid 3.1
SSDataWidgets.SSDBGridCtrlApt.3
Apex True DataBound Grid 5.0
TrueDBGrid50.TDBGrid
Apex True DataBound Grid 6.0
TrueDBGrid60.TDBGrid
Apex True OLE DB Grid 6.0
TrueOleDBGrid60.TDBGrid

 

ActiveX Calendar Controls
In addition to built-in support for ActiveX properties and methods, QuickTest Professional supports context-sensitive recording and verification on the following ActiveX Calendar controls:
Name
ProgId
Microsoft Date and Time Picker Control 6.0 (SP4)
MSComCtl2.DTPicker.2
Microsoft MonthView Control 6.0 (SP4)
MSComCtl2.MonthView.2

 

 

Microsoft Excel
When using Microsoft Excel files with QuickTest Professional 8.0(for example, to import or export data to or from the Data Table), you can work with Microsoft Excel 2000, 2002, 2003, and XP.

Microsoft Query

When using Microsoft Query with QuickTest Professional 8.0 (for example, for Database checkpoints), you can work with Microsoft Query 2000, 2002, 2003, and XP.

Additional Environments

QuickTest Professional add-ins support other environments such as Java, .NET Windows and Web Forms, SAP Solutions, Oracle, Siebel, PeopleSoft, Web Services, and terminal emulator applications. For more information on QuickTest Professional add-ins, contact your sales representative or Mercury Interactive Customer Support. 

function to check for time in hh:mm


'*****************************************
'function to check for time in hh:mm
'****************************************
Function  fnTimeFormat(strTime)
   'arrTime(0)="hh:mm"
  ' arrTime(1)="AM" or "PM"
  'arrTime(2)="TZ"
'  arrSplit(0)="HH"
'  arrSplit(1)="MM"
   arrTime=split(strTime," ")
 arrSplit=split(arrTime(0),":")

if((arrSplit(0)>=0 and arrSplit(0)<=12) and (arrSplit(1)>=0 and arrSplit(1)<=60) and (arrTime(1)="AM" or arrTime(1)="PM") and (LEN(arrTime(2))=3)) then
retVal=1
else
retVal=0
end if
fnTimeFormat=retVal
End Function

Naming conventions



Naming conventions


The Conventions for Naming for test cases, Scripts and Actions vary from Project to Project depending upon the Client.

4.1     Test Case Naming Conventions:

Test cases should be named in a manner that enables easy identification of the corresponding Use case (or the Scenario) for which the Test Case is written. The Onlooker should be able to trace the test case back to the use cane name or Scenario name by the name of the Test Case. Consistency should be maintained in following the hierarchy of naming.
Example  1: Considering that Each Use case is associated with one Test case. If the name of the Use Case were   UC_001 then the Test case name would be TC_001.
Example 2: In the Unilever Automation Project, SAP transactions are divided into different modules, in those modules different transactions are grouped together as a scenario, so for writing the test case for a particular scenario naming convention used is module name followed by scenario name.
For Module IMWM, if S014_01 is the scenario name, so name of the test case                   for the S014_01 scenario was given as IMWM_S014_01.

4.2     Script and Action Naming Conventions:

Similar to the Test case naming, Script naming should be done consistently with clarity and traceability. Typically each Test Script is prepared corresponding to each Test Case. Every Test Case contains one or more Conditions. Each Condition can be represented by an action in the script.
Therefore for a Test Script corresponding to a Test Case named TC_001 would be QTS_001.The hierarchy should be maintained in case the use cases or test cases are nested.
E.g.: TC_01_014 would have a QTP Test Script as QTS_01_014.
Action Naming:
Each Test Script can contain one or more Actions, with one or more actions representing a test Condition.
Actions can be named in 2 ways:
  1. Functionality of the Action
  2. Hierarchy of the Action in the Test Script.
  1. Functionality of the Action:
Typically Actions are segregated by their functionality in the Test Script. Therefore it would be easier to understand the Action if the name of the action represents the Functionality.
For E.g.: An Action written or recorded for logging the user should be named as Login orAuthentication for easy understandability.
An Action for booking tickets should be named as Book_Tickets
An Action for exiting the application named as Exit.

                         This also adds a huge advantage when the Actions are made reusable. Reusable Actions can be used between various scripts. When an Action is to be made reusable the action should be named as REUSE_(Action name).
Example: REUSE_Login.
2.   Hierarchy of the Action in the Script:
Since Actions are a part of the Test Script, for purpose of Clarity and tracking, Actions can be named as per Hierarchy.
For e.g.: Test Case Name à TC_01
QTP Test Script Name à QTS_01
Name of 1st action in the Script à QTS_01_01
Similarly Name of 9th Action in the ScriptàQTS_01_09

4.3     Variables and Constants:

QTP Scripts are in VB Script. Therefore, the naming conventions for variables can be followed alike VB Script Naming Conventions.
General Conventions followed in VBScript are:
Data Type Prefixes:
By using data type prefixes, your variables always indicate what they are designed for. I’m using just six prefixes:
Prefix
Data Types
Example
bBoolean (true or false)bChecked = True
dDate/timedStartTime = Now
iAll numeric data types
(Byte, Integer, Currency, Long, Single, Double)
iTax = iPrice * 0.076
oObjectsSet oFile = Nothing
sStringssTitle = “Welcome!”
uUser interface elementsuPara.style.display = “block”

Constants Prefix:
Usually there are only a handful of constants in any scripts. Indicating the data type therefore is less important for constants. Prefix letter c for all constants can be used.
e.g. Const cTitle = “Welcome!”
UDocument.title = cTitle

4.4     DataSheet Naming and Parameter Naming Conventions:


Every QTP Test Script contains 2 types of sheets.
  1. Global data sheet
  2. Local data sheets
àThe Global data sheet, which is a common sheet for all the actions of the script, is named by default as dt_globalsheet. This can be renamed as Global for all the Scripts for consistency.
àTypically, Each Action in the Script contains one data sheet, which is local to the   Action. This is by default, named after the Action to which it belongs. Therefore the name of the datasheet follows directly the name of the Action, which when named following its naming conventions, can be used efficiently for the data sheet too.
Parameter Naming:

Various Types of Parameters used in QTP are:
1) Test Parameters

a) Test Input Parameters: These should be named as IN_(relevant variable name). ‘In’ denoting that it’s an input parameter for the Test in whole. The name following IN should be a relevant name for the variable, denoting the purpose of its use. This should also comply with the standard variable naming conventions.
Example: IN_bFlag, IN_iIncrement etc.,
b) Test Output Parameters: On the similar lines of Input Parameters, these should be named as OUT_(relevant variable name). OUT representing that it’s an output parameter.
Example: OUT_sStatus.


2) Action Parameters

a) Action Input Parameters: These are local to Action of a Test. These can be named asACTIN_(variable name). ACTIN denoting that it’s an Action Input Parameter.
Example: ACTIN_iResult


b) Action Output Parameters: These could be named as ACTOUT_(var name).
Example: ACTOUT_bFlag
3) Environment Variables:
Environment variables are either built-in or User defined. Built-in variables cannot be declared named by the user, so their naming convention is not discussed.
User Defined Environment Variables are either Internal or External.
Internal Variables: ENV_INT_(variable name)
External Variables: ENV_EXT_(Variable name)


4.5     Function Naming Conventions

Functions should be named as   Func_(name). This can provide clarity and difference between a Reusable Action and a Function that can be used within Actions.
Example: Func_Save , Func_Add

function to check for date format in mm/dd/yyyy


********************************************************
 'function to check for date format in mm/dd/yyyy
 '*******************************************************
Function  fnDateFormat(strdate)
Set regEx = New RegExp
datePattern = "((0[1-9]|1[0-2])0[1-9]|[12][0-9]|3[0-1])/([0-9]{4})"
'Set pattern.
regEx.Pattern = datePattern
'Ignore case
regEx.IgnoreCase = True
'Match complete string or not
regEx.Global = MatchCompleteString

'Test the regular expression
IsRegEqual = regEx.Test(strdate)
Set regEx = Nothing
fnDateFormat=IsRegEqual
End Function