Monday, 6 August 2012

QTP - Check Points

Leave a Comment
QTP - Check point 

QTP - Check point 


  • Check point is a condition to differentiate between expected and actual states / results
  • Checkpoint is a verification point that compares a current value for a specified property with the expected value for that property.
  • Checkpoint enables you to identify whether Web site or application is functioning correctly.


CheckPoint  Type
CheckPoint Category (Object level)
Description
Standard Checkpoint 

Checks values of an object’s properties 
Browser Check Point
Checks for Browser's Information, such as
Version of Browser
Number of tabs utilized
Toolbars used and so.
Page checkpoint 
Check the Page's Information such as
Number of Images on the page and their names / source paths
Number of links on the page and their names / source paths 
Load time of the page
Object CheckPoint
Checks the characteristics of an Object
Examples:
WebEdit >  Name of it, Text of it, Value in EditBox, Visible property and so on.
WebLink > Name of link, Visible property, url of Link, href of link and so on.
WebButton > Name of WebButton, enabled/disabled property, value of it and so on.
WebButton CheckPoint
Checks the characteristics of WebButton
WebButton > Name of WebButton, enabled/disabled property, value of it and so on.
WebEdit CheckPoint
Checks the characteristics of WebEdit
WebEdit >  Name of it, Text of it, Value in EditBox, Visible property and so on.
WebLink CheckPoint
Checks the characteristics of WebLink
WebLink > Name of link, Visible property, url of Link, href of link and so on.
Web CheckBox CheckPoint
Checks the characteristics of Web Checkbox
WebCheckBox>  Name of it, Checked / Unchecked, Visible property and so on.
WebElement CheckPoint
Checks the characteristics of an WebElement
WebElement >  Name of it, Text of it, Value in it, Visible property and so on.
Image CheckPoint
Checks the characteristics of an Image
Image > name of image, SRC of it, image type of itme of it and so on.
WebTable CheckPoint
Checks for Table's Information. Such as
Number of rows, coluns, cell values, table names and so on.
Frame CheckPoint
Checks for Frame's Information. Such as
Frame's name, alt peroperty, items in frame and so on.
Text Checkpoint 
Text / web Text / Paragraphs of page
Checks that a text string is displayed in the appropriate place in a Web page or application window
Text Area CheckPoint
Form's content, Object's attached text
Checks that a text string is displayed in the appropriate place in an application window
Bitmap Checkpoint 
Any area of WebPage / Window
Checks any area of a Web page or application after capturing it as a bitmap
Database Checkpoint 
SQL / Oracle / Access DB
Checks the contents of databases accessed by an application or Web site
Accessibility Checkpoint 
All Objects (Page, Frames, Tables, images)
Identifies areas of a Web site to check for Section 508 compliancy / W3C accessibilities
XML Checkpoint
XML files (Locally, web application)
The data content of XML documents in XML files or XML documents in Web pages and frames.

Read More...

Saturday, 28 July 2012

QTP - COM - DCOM - DOM - AOM

Leave a Comment

QTP COM / DCOM / DOM / AOM

What is COM in QTP
What is DCOM in QTP
What is DOM in QTP
What is AOM in QTP

QTP - COM
QTP - DCOM
QTP - DOM
QTP - AOM




QTP > COM / DCOM / DOM / AOM

Component Object Model
Microsoft COM (Component Object Model) technology in the Microsoft Windows-family of Operating Systems enables software components to communicate. COM is used by developers to create re-usable software components, link components together to build applications, and take advantage of Windows services. The family of COM technologies includes COM+, Distributed COM (DCOM) and ActiveX Controls.

COM is used to give structured software architecture. COM objects are discrete components, each with a unique identity, which expose interfaces that allow applications and other components to access their features. COM objects are more versatile than Win32 DLLs because they are completely language-independent, have built-in inter-process communications capability, and easily fit into an object-oriented program design.

COM is used in applications such as the Microsoft Office Family of products. For example COM OLE technology allows Word documents to dynamically link to data in Excel spreadsheets and COM Automation allows users to build scripts in their applications to perform repetitive tasks or control one application from another.


Distributed Component Object Model
Distributed Component Object Model is an extension of the Component Object Model (COM) that allows COM components to communicate across network boundaries. Traditional COM components can only perform interprocess communication across process boundaries on the same machine. DCOM uses the RPC mechanism to transparently send and receive information between COM components (i.e., clients and servers) on the same network.

Automation Object Model
An object model is a structural representation of software objects (classes) that comprise the implementation of a system or application. An object model defines a set of classes and interfaces, together with their properties, methods and events, and their relationships.

These Object Models are developed based on COM technology. The QTP Automation Object Model will give structural representation of QTP classes. Using this we can access QTP options from any other applications by using a scripting or programming language. An Object Model will give a facility to control the functionality of an application programmatically.

QTP Automation Object Model developed based on COM and DCOM. We can automate QTP operations by writing VB scripts. It is possible because of COM. We can run our QTP scripts on a remote machine which is in the network. It is possible because of DCOM. To know how to run QTP Scripts on a remote machine follow this path…

Go to QTP HELP by pressing F1 in QTP  QuickTest Advanced References  QuickTest Professional Automation Object Model  Introduction  Learning the Basic Elements of a QuickTest Automation  Running Automation Scripts on a Remote Computer

Document Object Model
Document Object Model (DOM), a programming interface developed by the World Wide Web Consortium (W3C) to create and modify HTML pages and XML documents.

With the Document Object Model, programmers can create and build documents, navigate their structure, and add, modify, or delete elements and content. Anything found in an HTML or XML document can be accessed, changed, deleted, or added using the Document Object Model. The Document Object Model can be used with any programming or scripting languages.

 To Learn XML Dom navigate to http://www.w3schools.com/dom/default.asp
To Learn HTML Dom navigate to http://www.w3schools.com/htmldom/default.asp


How DOM is useful for Automation Testers?
DOM is useful when working with web applications. We go for DOM to access internal properties or methods of a web application. “.Object” property is used to access internal properties or methods. To see available internal methods and properties, go to Object Spy  point to any web object  select Runtime object properties radio button

For QTP 10 select Native Properties Radio button



Below code is to get internal property or to access internal method of a web edit 

Msgbox Browser("Google").Page("Google").webedit("q").object.value
Browser("Google").Page("Google").webedit("q").object.focus

Focus is a method and Value is a property for webedit.
Object is a property for every QTP web object to access internal properties or methods.
Read More...

QTP - License Types

Leave a Comment

QTP License Types
How Many Types of Licenses supported by QTP


QTP – Seat License

QTP – Concurrent License
QTP – Commuter License 





QTP > License Types
To work with QTP we should always require a license. When you install QTP, by default it will provide a 30 day demo license (For QTP 11). In the demo period or completion of demo period, to work with QTP you must give the license information specified below.
Seat License:
It’s a permanent license which is specific to the computer on which QTP installed. If you want to have QTP in two machines and you want to use the both machines of QTP then you must buy 2 seat licenses. To configure seat license for QTP you must have a license code that is given by the vendor.


Concurrent License:
This is a network based license that can be used by multiple users. If I brought 5 concurrent QTP licenses and I have 10 people to work on, then any 5 people can connect to my license server to work with QTP. That means anybody can use QTP but at a time a maximum of 5 people can work. A concurrent license can have more licenses in it. To configure a concurrent license for your QTP, you must have concurrent license server name or IP address.

Commuter License:
A commuter license is also a type of concurrent license that can avail during the unavailability concurrent license server. If you are going on a business trip and not able connect to the concurrent license server then you can ask administrator to install commuter license. A commuter license is a concurrent license that works like a seat license for a specific period.
If you have configured 5 concurrent licenses and if you want to configure a commuter license for a person’s onsite business trip then from that time onwards you should work with 4 concurrent licenses till the specified configured period of commuter license. The Commuter license validity is up to 180 days.
You can change your license type at any time (as long as you are logged in with administrator permissions on your computer). For example, if you are currently working with a seat license, you can choose to connect to a concurrent license server, if one is available on your network.


Help -> About Quick Test Professional -> Click on License Button to know about currently opened QTP license information.

Read More...

QTP 11 Patches - Information

Leave a Comment


QTP 11 Patches
QTP 11 Patches and Information
What are all the patches for QTP ?





QTP 11.0 - Patches and Information


Here are a set of patches that might help with respect to  QTP 11.0:

QTP_00699
·         QTP 11 support for 64-Bit applications.
·         The 64-Bit technologies that are currently supported:
·         Recovery scenarios did not work in BPT wrapper tests.
·         Run-time errors were displayed if you ran a business component that contained a QCUtil.CurrentTest.Name step.
·         Function libraries that were created from an
·         QuickTest crashed or an OS blue screen appeared when using a User-Defined / Non-HLLAPI emulator on Windows 7 with Office 2007/2010 installed.
·         Testing applications in Internet Explorer when Internet
·         Explorer is in protected mode.
·         Support for Oracle Forms 11g.Enhanced support for OracleTable objects.
·         This patch adds support for testing PowerBuilder 12 applications
·         This patch adds support for testing SAP CRM 7 (a.k.a. ICWC 7, Interaction Center Web Client 7)
·         This patch installs an updated version of the .NET Add-in, providing testing support for Silverlight 2, 3 and 4.
·         This patch provides official support for testing Web applications in Firefox 3.6
http://support.openview.hp.com/downloadAPatch.jsp?patchName=QTPWEB_00063.EXE&prodName=qtp&prodRelease=11.0

QTPNET_00062

This hotfix fixes the following problems:

1. QuickTest Professional sometimes caused .Net 4 WPF applications with multiple AppDomains to crash.

2. QuickTest Professional sometimes caused an error message to be displayed by the application when

spying on a specific WPF combo box.


QTPNET_00066

1. This hotfix enables a custom server to instruct QuickTest Professional  to assign a logical name to a test object by implementing a 'logical_name' property defined in its CustomPropInterface.

2. This hotfix enables a custom server to define run methods that include optional parameters by tagging the parameters with the [Optional] attribute. To do this, the argument element's IsMandatory attribute needs to be set to 'false' in the test object configuration file.
 
3. Prior to this hotfix, QuickTest would sometimes ignore the return value of a custom server's IsKnownPartOf method when applied to a combo box child.

4. Prior to this hotfix, QuickTest would sometimes load into the application all the assemblies in the folder containing the custom server dll.


Read More...

QTP - Send Keys - Cheat Sheet

Leave a Comment


QTP Send keys Implementation
QTP SendKeys – Cheat Sheet
QTP – WScript – Send Keys
HowTo – Use Sendkeys in QTP









A quick cheatsheet for all the characters that can be sent using the sendkeys method:

Example:
Set WshShell = CreateObject("WScript.Shell") 
'Control+Shift+End
WshShell.SendKeys "^+{END}"

'Control+O
WshShell.SendKeys "^o"


Some common examples:
1. a and b are pressed, send the string argument : “(ab)”
2. To Send same letter multiple times : “{a 10}”
3. To Send ALT Tab :  wshell.sendkeys ” %{TAB}”
4. To Send ALT and space : wshell.sendkeys “%{ }”
5. TO Send char : wshell.Sendkeys “(a)”
6. Right Click of Mouse : Wshell.SendKeys “+{F10}”
7. Mouse Down : wshell.sendkeys “{DOWN}”
8. Mouse UP : wshell.sendkeys “{UP}”

Key
Argument

BACKSPACE
{BACKSPACE}, {BS}, or {BKSP}

BREAK
{BREAK}

CAPS LOCK
{CAPSLOCK}

DEL or DELETE
{DELETE} or {DEL}

DOWN ARROW
{DOWN}

END
{END}

ENTER
{ENTER} or ~

ESC
{ESC}

HELP
{HELP}

HOME
{HOME}

INS or INSERT
{INSERT} or {INS}

LEFT ARROW
{LEFT}

NUM LOCK
{NUMLOCK}

PAGE DOWN
{PGDN}

PAGE UP
{PGUP}

PRINT SCREEN
{PRTSC}

RIGHT ARROW
{RIGHT}

SCROLL LOCK
{SCROLLLOCK}

TAB
{TAB}

UP ARROW
{UP}

F1
{F1}

F2
{F2}

F3
{F3}

F4
{F4}

F5
{F5}

F6
{F6}

F7
{F7}

F8
{F8}

F9
{F9}

F10
{F10}

F11
{F11}

F12
{F12}

F13
{F13}

F14
{F14}

F15
{F15}

F16
{F16}


Key
Special Character
SHIFT
+
CTRL
^
ALT
%



Read More...

Monday, 6 August 2012

QTP - Check Points

QTP - Check point 

QTP - Check point 


  • Check point is a condition to differentiate between expected and actual states / results
  • Checkpoint is a verification point that compares a current value for a specified property with the expected value for that property.
  • Checkpoint enables you to identify whether Web site or application is functioning correctly.


CheckPoint  Type
CheckPoint Category (Object level)
Description
Standard Checkpoint 

Checks values of an object’s properties 
Browser Check Point
Checks for Browser's Information, such as
Version of Browser
Number of tabs utilized
Toolbars used and so.
Page checkpoint 
Check the Page's Information such as
Number of Images on the page and their names / source paths
Number of links on the page and their names / source paths 
Load time of the page
Object CheckPoint
Checks the characteristics of an Object
Examples:
WebEdit >  Name of it, Text of it, Value in EditBox, Visible property and so on.
WebLink > Name of link, Visible property, url of Link, href of link and so on.
WebButton > Name of WebButton, enabled/disabled property, value of it and so on.
WebButton CheckPoint
Checks the characteristics of WebButton
WebButton > Name of WebButton, enabled/disabled property, value of it and so on.
WebEdit CheckPoint
Checks the characteristics of WebEdit
WebEdit >  Name of it, Text of it, Value in EditBox, Visible property and so on.
WebLink CheckPoint
Checks the characteristics of WebLink
WebLink > Name of link, Visible property, url of Link, href of link and so on.
Web CheckBox CheckPoint
Checks the characteristics of Web Checkbox
WebCheckBox>  Name of it, Checked / Unchecked, Visible property and so on.
WebElement CheckPoint
Checks the characteristics of an WebElement
WebElement >  Name of it, Text of it, Value in it, Visible property and so on.
Image CheckPoint
Checks the characteristics of an Image
Image > name of image, SRC of it, image type of itme of it and so on.
WebTable CheckPoint
Checks for Table's Information. Such as
Number of rows, coluns, cell values, table names and so on.
Frame CheckPoint
Checks for Frame's Information. Such as
Frame's name, alt peroperty, items in frame and so on.
Text Checkpoint 
Text / web Text / Paragraphs of page
Checks that a text string is displayed in the appropriate place in a Web page or application window
Text Area CheckPoint
Form's content, Object's attached text
Checks that a text string is displayed in the appropriate place in an application window
Bitmap Checkpoint 
Any area of WebPage / Window
Checks any area of a Web page or application after capturing it as a bitmap
Database Checkpoint 
SQL / Oracle / Access DB
Checks the contents of databases accessed by an application or Web site
Accessibility Checkpoint 
All Objects (Page, Frames, Tables, images)
Identifies areas of a Web site to check for Section 508 compliancy / W3C accessibilities
XML Checkpoint
XML files (Locally, web application)
The data content of XML documents in XML files or XML documents in Web pages and frames.

Saturday, 28 July 2012

QTP - COM - DCOM - DOM - AOM


QTP COM / DCOM / DOM / AOM

What is COM in QTP
What is DCOM in QTP
What is DOM in QTP
What is AOM in QTP

QTP - COM
QTP - DCOM
QTP - DOM
QTP - AOM




QTP > COM / DCOM / DOM / AOM

Component Object Model
Microsoft COM (Component Object Model) technology in the Microsoft Windows-family of Operating Systems enables software components to communicate. COM is used by developers to create re-usable software components, link components together to build applications, and take advantage of Windows services. The family of COM technologies includes COM+, Distributed COM (DCOM) and ActiveX Controls.

COM is used to give structured software architecture. COM objects are discrete components, each with a unique identity, which expose interfaces that allow applications and other components to access their features. COM objects are more versatile than Win32 DLLs because they are completely language-independent, have built-in inter-process communications capability, and easily fit into an object-oriented program design.

COM is used in applications such as the Microsoft Office Family of products. For example COM OLE technology allows Word documents to dynamically link to data in Excel spreadsheets and COM Automation allows users to build scripts in their applications to perform repetitive tasks or control one application from another.


Distributed Component Object Model
Distributed Component Object Model is an extension of the Component Object Model (COM) that allows COM components to communicate across network boundaries. Traditional COM components can only perform interprocess communication across process boundaries on the same machine. DCOM uses the RPC mechanism to transparently send and receive information between COM components (i.e., clients and servers) on the same network.

Automation Object Model
An object model is a structural representation of software objects (classes) that comprise the implementation of a system or application. An object model defines a set of classes and interfaces, together with their properties, methods and events, and their relationships.

These Object Models are developed based on COM technology. The QTP Automation Object Model will give structural representation of QTP classes. Using this we can access QTP options from any other applications by using a scripting or programming language. An Object Model will give a facility to control the functionality of an application programmatically.

QTP Automation Object Model developed based on COM and DCOM. We can automate QTP operations by writing VB scripts. It is possible because of COM. We can run our QTP scripts on a remote machine which is in the network. It is possible because of DCOM. To know how to run QTP Scripts on a remote machine follow this path…

Go to QTP HELP by pressing F1 in QTP  QuickTest Advanced References  QuickTest Professional Automation Object Model  Introduction  Learning the Basic Elements of a QuickTest Automation  Running Automation Scripts on a Remote Computer

Document Object Model
Document Object Model (DOM), a programming interface developed by the World Wide Web Consortium (W3C) to create and modify HTML pages and XML documents.

With the Document Object Model, programmers can create and build documents, navigate their structure, and add, modify, or delete elements and content. Anything found in an HTML or XML document can be accessed, changed, deleted, or added using the Document Object Model. The Document Object Model can be used with any programming or scripting languages.

 To Learn XML Dom navigate to http://www.w3schools.com/dom/default.asp
To Learn HTML Dom navigate to http://www.w3schools.com/htmldom/default.asp


How DOM is useful for Automation Testers?
DOM is useful when working with web applications. We go for DOM to access internal properties or methods of a web application. “.Object” property is used to access internal properties or methods. To see available internal methods and properties, go to Object Spy  point to any web object  select Runtime object properties radio button

For QTP 10 select Native Properties Radio button



Below code is to get internal property or to access internal method of a web edit 

Msgbox Browser("Google").Page("Google").webedit("q").object.value
Browser("Google").Page("Google").webedit("q").object.focus

Focus is a method and Value is a property for webedit.
Object is a property for every QTP web object to access internal properties or methods.

QTP - License Types


QTP License Types
How Many Types of Licenses supported by QTP


QTP – Seat License

QTP – Concurrent License
QTP – Commuter License 





QTP > License Types
To work with QTP we should always require a license. When you install QTP, by default it will provide a 30 day demo license (For QTP 11). In the demo period or completion of demo period, to work with QTP you must give the license information specified below.
Seat License:
It’s a permanent license which is specific to the computer on which QTP installed. If you want to have QTP in two machines and you want to use the both machines of QTP then you must buy 2 seat licenses. To configure seat license for QTP you must have a license code that is given by the vendor.


Concurrent License:
This is a network based license that can be used by multiple users. If I brought 5 concurrent QTP licenses and I have 10 people to work on, then any 5 people can connect to my license server to work with QTP. That means anybody can use QTP but at a time a maximum of 5 people can work. A concurrent license can have more licenses in it. To configure a concurrent license for your QTP, you must have concurrent license server name or IP address.

Commuter License:
A commuter license is also a type of concurrent license that can avail during the unavailability concurrent license server. If you are going on a business trip and not able connect to the concurrent license server then you can ask administrator to install commuter license. A commuter license is a concurrent license that works like a seat license for a specific period.
If you have configured 5 concurrent licenses and if you want to configure a commuter license for a person’s onsite business trip then from that time onwards you should work with 4 concurrent licenses till the specified configured period of commuter license. The Commuter license validity is up to 180 days.
You can change your license type at any time (as long as you are logged in with administrator permissions on your computer). For example, if you are currently working with a seat license, you can choose to connect to a concurrent license server, if one is available on your network.


Help -> About Quick Test Professional -> Click on License Button to know about currently opened QTP license information.

QTP 11 Patches - Information



QTP 11 Patches
QTP 11 Patches and Information
What are all the patches for QTP ?





QTP 11.0 - Patches and Information


Here are a set of patches that might help with respect to  QTP 11.0:

QTP_00699
·         QTP 11 support for 64-Bit applications.
·         The 64-Bit technologies that are currently supported:
·         Recovery scenarios did not work in BPT wrapper tests.
·         Run-time errors were displayed if you ran a business component that contained a QCUtil.CurrentTest.Name step.
·         Function libraries that were created from an
·         QuickTest crashed or an OS blue screen appeared when using a User-Defined / Non-HLLAPI emulator on Windows 7 with Office 2007/2010 installed.
·         Testing applications in Internet Explorer when Internet
·         Explorer is in protected mode.
·         Support for Oracle Forms 11g.Enhanced support for OracleTable objects.
·         This patch adds support for testing PowerBuilder 12 applications
·         This patch adds support for testing SAP CRM 7 (a.k.a. ICWC 7, Interaction Center Web Client 7)
·         This patch installs an updated version of the .NET Add-in, providing testing support for Silverlight 2, 3 and 4.
·         This patch provides official support for testing Web applications in Firefox 3.6
http://support.openview.hp.com/downloadAPatch.jsp?patchName=QTPWEB_00063.EXE&prodName=qtp&prodRelease=11.0

QTPNET_00062

This hotfix fixes the following problems:

1. QuickTest Professional sometimes caused .Net 4 WPF applications with multiple AppDomains to crash.

2. QuickTest Professional sometimes caused an error message to be displayed by the application when

spying on a specific WPF combo box.


QTPNET_00066

1. This hotfix enables a custom server to instruct QuickTest Professional  to assign a logical name to a test object by implementing a 'logical_name' property defined in its CustomPropInterface.

2. This hotfix enables a custom server to define run methods that include optional parameters by tagging the parameters with the [Optional] attribute. To do this, the argument element's IsMandatory attribute needs to be set to 'false' in the test object configuration file.
 
3. Prior to this hotfix, QuickTest would sometimes ignore the return value of a custom server's IsKnownPartOf method when applied to a combo box child.

4. Prior to this hotfix, QuickTest would sometimes load into the application all the assemblies in the folder containing the custom server dll.


QTP - Send Keys - Cheat Sheet



QTP Send keys Implementation
QTP SendKeys – Cheat Sheet
QTP – WScript – Send Keys
HowTo – Use Sendkeys in QTP









A quick cheatsheet for all the characters that can be sent using the sendkeys method:

Example:
Set WshShell = CreateObject("WScript.Shell") 
'Control+Shift+End
WshShell.SendKeys "^+{END}"

'Control+O
WshShell.SendKeys "^o"


Some common examples:
1. a and b are pressed, send the string argument : “(ab)”
2. To Send same letter multiple times : “{a 10}”
3. To Send ALT Tab :  wshell.sendkeys ” %{TAB}”
4. To Send ALT and space : wshell.sendkeys “%{ }”
5. TO Send char : wshell.Sendkeys “(a)”
6. Right Click of Mouse : Wshell.SendKeys “+{F10}”
7. Mouse Down : wshell.sendkeys “{DOWN}”
8. Mouse UP : wshell.sendkeys “{UP}”

Key
Argument

BACKSPACE
{BACKSPACE}, {BS}, or {BKSP}

BREAK
{BREAK}

CAPS LOCK
{CAPSLOCK}

DEL or DELETE
{DELETE} or {DEL}

DOWN ARROW
{DOWN}

END
{END}

ENTER
{ENTER} or ~

ESC
{ESC}

HELP
{HELP}

HOME
{HOME}

INS or INSERT
{INSERT} or {INS}

LEFT ARROW
{LEFT}

NUM LOCK
{NUMLOCK}

PAGE DOWN
{PGDN}

PAGE UP
{PGUP}

PRINT SCREEN
{PRTSC}

RIGHT ARROW
{RIGHT}

SCROLL LOCK
{SCROLLLOCK}

TAB
{TAB}

UP ARROW
{UP}

F1
{F1}

F2
{F2}

F3
{F3}

F4
{F4}

F5
{F5}

F6
{F6}

F7
{F7}

F8
{F8}

F9
{F9}

F10
{F10}

F11
{F11}

F12
{F12}

F13
{F13}

F14
{F14}

F15
{F15}

F16
{F16}


Key
Special Character
SHIFT
+
CTRL
^
ALT
%