Monday 22 December 2014

Object Recognition with Flex Add-in or Getting ready to work with Flex Add-in Using UFT or QTP

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Object Recognition with Flex Add-in or Getting ready to work with Flex Add-in Using UFT or QTP

 


Requirements


Flex Application Automated Testing and the QTP agent require installing the following:

  • Flash Player ActiveX control, version 9.0.28.0 or higher
  • Microsoft Internet Explorer, version 6 or later
  • Mercury Quick Test Professional 9.2 and patch 1701, Quick Test Professional 9.5 or UFT or Higher version
  • Adobe Flex 3 Plug-in for Mercury Quick Test Pro or higher




Note:- Flex add-in is now directly available with UFT versions and no need for explicit download from Adobe.

Installation

1.     Flex Builder 3 professional and the QTP add-in will be present in the path <Drive>\Program Files\Adobe\Flex Builder 3\Installers\

2.     QTP_Plugin_Installer.exe Run this exe file and this will install the Add-in.

Note:-

For Add-in installation we can copy only the add-in and install it is not necessary to install Flex Builder 3 professional.

Verification

1.     GO to registry and verify the following dll’s is present
  • TEAPluginIE.dll
  • TEAPluginQTP.dll
Note:-   If this dll’s are Registry is not present then it means that the Add-in is not installed properly.

2.    Test the Flash player version, the following link will test flash player version in your browser: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507

3.     Verify TEAFlexAgentIE Class is present in the IE Add-ons.


4.     Verify after installation the Flex Add-in is present as shown in the below Snapshot.


Setting applications for testing or Flex Project


We have to pre-compile the test application has the functional testing classes are embedded in the application at compile time, and the application has no external dependencies for automated testing at run time. The below are steps to configure the application for automation testing.

 1.     Start Flex Builder.

2.     Create a new Flex Project.

3.     Select your new Flex project in the Navigator.

4. Flex Build Path

1.     Right Click on the Project. and Select Properties
2.     Select “Flex Build Path” from the Left panel List.
3.     Click on the Library Path Tab in the Right panel.

 This is the list of Libraries to be added while compiling the project

1.     automation.swc
2.     automation_agent.swc
3.     automation_dmv.swc
4.     automation_flashflexkit.swc
5.     qtp.swc



Note:-

If the Library is not added into the project Use “Add SWC” button to add the reference into the exist project to be complied. Path: - “<Installation Drive>\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs”

**<Installation Drive>= C: or D: Drive

5. Flex Compiler

1.     Right Click on the Project and Select properties.
2.     Select “Flex Complier” from the Left panel List
3.     Verify/ Add Additional Complier Arguments is set a s shown in the below 





-include-libraries "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_agent.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\qtp.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_dmv.swc"
 

4.         Click the OK button to save your changes and OK to close the project Properties dialog box.

5.         Compile your Flex application.

Note:-

When the Project is Compiled/Built with all above specified settings, it helps the QTP Flex Agents to recognize the Flex Test objects and differentiate into proper Flex class 

Adobe Flash CS3


Automation of the Flash CS3 is done with help of Adobe Flex Component Kit

When Flex controls, containers, skins, and other assets is created using Flash CS3 Professional and import those assets into our Flex application, we need to include the automation_flashflexkit.swc library.

If we are using run-time loading, re-compile the runtimeloading.swf file by using the build.bat file in flex_builder_root\sdks\3.0.0\templates\automation-runtimeloading-files\. The build.bat batch file includes the necessary libraries.

Advantage 

  1. We will be able to record the actions performed on the Flex Controls.
  2. Objects are recognized based on there Standard flex classes.
  3. We will be able to retrieve the Run time value from the Controls.
  4. We will be able to use the descriptive programming for automation testing with QTP
  5. We can Replay the test scripted/ recorded on the test application.

Limitation/Disadvantages








  1. When we embed functional testing classes in our test application SWF file at compile time, the SWF file size increases.
  2. As the size of the SWF file increases then the download time of the SWF file will increase and involve some performance issue. 
  3. Due to the size issue we may require 2 SWF files. One file with functional testing classes embedded and one without for functional testing and deployment.
  4. QTP 9.1 does not support Smart Identification when working with Flex add-ins
  5. Currently Flex Add-in for QTP 9.5 does not support the Record or relay on IE 7, Fire Fox or Netscape.
  6. The object identification property will not work with Flex controls
  7. With currently downloaded version of QTP Flex Add-in only 30 actions can be performed on the test application after which licensing message box appears and will not be able to continue.

QTP Recorded Script

The below is the script Generated for the above Test flex Application. We were successfully able to perform the required actions for the test Application. The script for the same can be seen the below snapshot.
We are also able to work with the flex object with descriptive programming.


QTP Recorded Actions Performed on flex Action

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Sunday 21 December 2014

UFT - QTP How to check presence of an Image on web page

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Function Parameters
objPageName is the Page object link "Browser("*******").Page("*******")
PropertyName is the Property name of the Image we want to verify
propertyvalue is the Property value of the Image we want to verify
Index - Index starts from 0


Function VerifyImage(byval objPageName,  byval PropertyName, byval propertyvalue, byval Index)
   Set ObjPage= objPageName
   If Index ="" Then
    If ObjPage.Image(PropertyName&":="&propertyvalue).exist(10) then
    ObjPage.Image(PropertyName&":="&propertyvalue).highlight ' comment later
    Reporter.ReportEvent 4"VerifyImage""Checking for lmage"& propertyvalue
    Reporter.ReportEvent micPass,"VerifyImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "Found"
    VerifyImage =0
   Else
    Reporter.ReportEvent 4"VerifyImage""Checking for Image"& propertyvalue
    Reporter.ReportEvent micFail,"VerifyImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "was not Found or available"
    VerifyImage = 1
  End if
 else
  If ObjPage.Image(PropertyName&":="&propertyvalue, "Index:="&Index).exist(10) then
    Reporter.ReportEvent 4"VerifyImage""Checking for lmage "& propertyvalue
    Reporter.ReportEvent micPass,"VerifyImage","Image with Property " & PropertyName & "Property Value" & propertyvalue & "Found"
    VerifyImage =0
   Else
    Reporter.ReportEvent 4"VerifyImage""Checking for lmage"& propertyvalue
    Reporter.ReportEvent micFail,"VerifyImage","Image with Property  " & PropertyName & "Property Value" & propertyvalue & "was not Found or available"
    VerifyImage = 1
  End if
End If
End Function






                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

UFT - QTP - How to check presence of Link on a web page

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview


Function Parameters
objPageName is the Page object link "Browser("*******").Page("*******")
PropertyName is the Property name of the link we want to verify
propertyvalue is the Property value of the link we want to verify
Index - Index starts from 0


Function VerifyLink(byval objPageName,  byval PropertyName, byval propertyvalue, byval Index)
   Set ObjPage= objPageName
   If Index = "" Then
    If ObjPage.Link(PropertyName&":="&propertyvalue).exist(10) then
    ObjPage.Link(PropertyName&":="&propertyvalue).highlight ' comment later
    Reporter.ReportEvent 4"VerifyLink""Checking for link"& propertyvalue
    Reporter.ReportEvent micPass,"VerifyLink","Link with Property " & PropertyName & "Property Value " & propertyvalue & "Found"
    VerifyLink =0
   Else
    Reporter.ReportEvent 4"VerifyLink""Checking for link"& propertyvalue
    Reporter.ReportEvent micFail,"VerifyLink","Link with Property " & PropertyName & "Property Value " & propertyvalue & "was not Found or available"
    VerifyLink = 1
  End if
 else
  If ObjPage.Link(PropertyName &":="& propertyvalue, "Index:="& Index).exist(10) then
    ObjPage.Link(PropertyName&":="&propertyvalue, "Index:="& Index).highlight ' comment later
    Reporter.ReportEvent 4"VerifyLink""Checking for link"& propertyvalue
    Reporter.ReportEvent micPass,"VerifyLink","Link with Property" & PropertyName & "Property Value" & propertyvalue & "Found"
    VerifyLink =0
   Else
    Reporter.ReportEvent 4"VerifyLink""Checking for link"& propertyvalue
    Reporter.ReportEvent micFail,"VerifyLink","Link with Property" & PropertyName & "Property Value" & propertyvalue & "was not Found or available"
    VerifyLink = 1
  End if
End If
End Function


Regards,
Sreenu Babu

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Saturday 20 December 2014

What is HP UFT?


                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview
 
 
What is HP UFT - UNIFIED FUNCTIONAL TESTING

In simple words HP UFT (UNIFIED FUNCTIONAL TESTING) is a functional and regression automation testing tool for automating software applications and environments

UFT unifies/integrates two automation tools as a single tool.

UFT  =  HP QTP ( Quick Test Professional) + HP ST ( Service Test)

Earlier HP - ST was sold separately by HP. The purpose of Service Test is for testing Service Oriented Architecture ( SOA) applications and support functional test areas like

1) WSDL based web Services
2) RESTful Web Services
3) Java Classes
4) Customizable C# custom events
5) Extensible
 

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Friday 29 August 2014

UFT Latest Version UFT 12.01 Released/ UFT Latest version new features


You can download a 60 day trail version of this software from the following link
http://www8.hp.com/in/en/software-solutions/unified-functional-testing-automation/

 
New Features of UFT 12.01
You can use the new UFT Windows Runtime Add-in to test Windows Runtime applications running on Windows 8.x or Windows Server 2012.
A Windows Runtime application is any application running from the Start or Apps screen in Windows 8.x/Windows Server 2012 and installed from the Windows Store. These applications differ from traditional applications in previous versions of Windows (which run in the Desktop screen in Windows 8.x/Windows Server 2012).
In UFT, the Windows Runtime Add-in is always available when UFT is installed on a computer running Windows 8.x.
Using the Windows Runtime Add-in, you can:
·         Record and run tests on your Windows Runtime applications
·         Create object repositories with Windows Runtime objects
·         Use UFT on Windows 8.x by easily navigating between UFT (running on the Desktop screen) and your Windows Runtime applicationYou can use the new UFT Windows Runtime Add-in to test Windows Runtime applications running on Windows 8.x or Windows Server 2012.A Windows Runtime application is any application running from the Start or Apps screen in Windows 8.x/Windows Server 2012 and installed from the Windows Store. These applications differ from traditional applications in previous versions of Windows (which run in the Desktop screen in Windows 8.x/Windows Server 2012).In UFT, the Windows Runtime Add-in is always available when UFT is installed on a computer running Windows 8.x. Using the Windows Runtime Add-in, you can:
For details on using the Windows Runtime Add-in, see the section on the Windows Runtime Add-in in the HP Unified Functional Testing Add-ins Guide
You can use the new SiebelOpenUI Web 2.0 Add in (toolkit) to test applications designed using the Siebel Open UI framework. The toolkit is based on Web Add-in Extensibility and extends the Web Add-in to recognize unique Siebel Open UI objects and operations.
The SiebelOpenUI toolkit, installed after UFT as part of the Web 2.0 toolkit installation, is displayed as a child add-in of the Web Add-in.
For details:
·         on the SiebelOpenUI toolkit and Web 2.0 toolkits, see the Web 2.0 Add-ins section in the HP Unified Functional Testing Add-ins Guide.
·         on the SiebelOpenUI available objects and methods, see the Web 2.0 Toolkits/SiebelOpenUI section of the HP UFT Object Model Reference for GUI Testing.
You can use the new SAPUI5 Add in (toolkit) to test applications designed using the SAPUI5 SDK running on Internet Explorer. The toolkit is based on Web Add-in Extensibility and extends the Web Add-in to recognize unique SAPUI5 objects and operations.
The SAPUI5 toolkit is always available as a child add-in of the Web Add-in.
 
The ability to test Web applications on Safari browser running on a remote Mac computer is now officially supported.
In addition to running tests on the remote Safari browser, you can now:
·         Use the new Remote Object Spy to spy on Web applications running on Safari
·         Use the CaptureBitmap test object method when running on Safari
·         See snapshots of the test run in your test results
·         Secure the communication between the Mac computer and the computer running UFT using an access passphrase and an SSL connection.
·         The Unified Functional Testing Agent Chrome Extension is now available in the web store, aligning with Chrome’s latest technology, and enabling automatic updates of UFT’s Chrome support.
For details, see the details on testing in Google Chrome in the Web Quick Reference section of the Add-ins guide.
·         Using the GetVisibleText method for Insight Objects: You can now retrieve text from an object recognized by Insight, using the OCR mechanism. You can use this text for verification purposes, or as a way of differentiating between objects or states of the application.
For details, see the GetVisibleText method page in the Insight section of the HP UFT Object Model Reference for GUI Testing.
·         Basic support for Flex Advanced Data Grid objects: The UFT Flex add-in now recognizes Advanced Data Grid controls as FlexTable test objects, and supports basic table functionality for these controls. In addition, UFT supports ExpandRow, CollapseRow, and SortByColumn operations for tables of this type.
For more details on these methods, see the FlexTable object in the Flex section of the HP UFT Object Model Reference for GUI Testing.
·         Import a WADL file from a URL: Previously, in order to use a WADL file to create REST Service methods, you had to import the WADL containing the methods from a file saved on the file system. Now, you can also import the WADL file from a URL, in the same manner you import a WSDL file from a URL.
The Flights API application also now includes a sample WADL as part of the service.
·         Use preemptive security when testing a Web service with security: UFT can now send the Web service step's security authentication when sending a Web service request.
Previously, when testing a Web service method that required security settings, UFT did not initially send security credentials for a web service test step and instead waited for the request from the Web server for the security credentials. Now, by selecting an option in the General tab of the Properties pane (for HTTP Request and REST Service methods), or the HTTP tab of the Properties pane (for Web service methods and SOAP Request steps), you can send the security information with the initial Web service request.
·         Debugging improvements: When debugging your test, the Breakpoints and Call Stack Pane show the name of the current document (the document that contains the breakpoint or the document in the current run context of the test). This enables you to navigate your debugging session more easily.
·         Specify a destination sheet when exporting a data table to Excel: Using the DataTable.ExportSheet method, you can now specify the name of the destination worksheet. This enables better control of your Excel output. For example, you can generate a different sheet for every iteration in your test run.
·         Documentation improvements: The new HTML5 documentation format provides a new look and feel and enables you to:
o    View search results with a short excerpt from the topics found.
o    Use the search filter to limit your searches to the HP UFT Object Model Reference for GUI Testing, is addition to the search filters that existed previously.
·         Navigate more smoothly. For example, when you click a cross-reference, the referenced page opens and scrolls to the relevant location.
UFT 12.01 now includes the following new supported environments:
·         Updated support for the latest versions of Firefox and Chrome. For details on specific browser versions, see the HP Unified Functional Testing Product Availability Matrix.
·         JDK 1.8
·         HyperV (technology preview level)
·         SAP Web Dynpro ABAP for NW 7.40
·         Expanded Internet Explorer support for SAP Web UI
·         Windows 2012 R2 (technology preview level)