Working with Object Repository Merge Tool in UFT/QTP

Scenario:- How we can merge two object Repositories in UFT

Object Repository Merge Tool in UFT

Solution:- We need to use “Object Repository Merge Tool ” available in “Object Repository Manager” in UFT.

Locate:- Resources – Object Repository Manager – Tools – Object Repository Merge Tool



Important :-

  • Used for Merging and Resolving Conflicts
  • We cannot work with Object Repository Manager or the Object Repository
  • Comparison Tool while the Object Repository Merge Tool is open

  • Test objects that do not have description properties, such as Page are compared 
  •  by name only


Types of Conflicts:-

  • Different Objects with Same Name
  • Identical Description but Different Name
  • Similar Description

Difference between VB and VBScripting?

Scenario:– Please explain the difference between VB and VB-Scripting language.

VB VS VBSCRIPTING


Solution:

Visual Basic
VBScript
Uses different types of variables and constants
Uses only one type of variable–the Variant
Can be compiled into an exe file
Is interpreted by the Internet Explorer browser software
Uses event procedures to react to events
Uses event handlers to react to events
Has an easy-to-use integrated development environment (IDE)
Does not have an easy-to-use IDE specifically for VBScript
Runs as stand-alone language
Must be integrated with HTML

More Interview Questions

Learning basic’s of Extensible MarkUp Language(XML)

Scenario:– Learning XML, Rules and Meaning of XML, Well formed XML, Delimiters in XML
Solution :- In this video tutorial we tried to touch basics of XML.
What is XML?

  • Extensible Markup Language
  • Extensible :- Capable of Being Extended
  • Markup :- In the form of tags, indicating logical components of a document
  • Used for storing and Transporting data
  • Simplicity, portability, platform independence

XML Rules:-  
  • All XML elements must have Start and End Tag 
  • Tags are case Sensitive  
  • Proper Nesting of elements 
  • Starts with root Element(Parent-Child Tree Structure) 
Example :-


<?xml version="1.0"?>
<Tutorial>
<Topic>XML</Topic>
<By>uftHelp</By>
</Tutorial>

Various ways to Reverse String in UFT/QTP using Vbscripting

Scenario:- We need to Reverse a String, without using Vb-scripting Inbuilt Function(strReverse)

Solution1:- We will use “Mid” function for reversing the Input String

Example Code:-


sRev = "UFTHELP, Ur First Testing Help"
Msgbox fnReverse(sRev)

Public Function fnReverse(sRev)
for i = 1 to len(sRev)
sNew = mid(sRev,i,1) &sNew


next
fnReverse = sNew

End Function

Solution 2:- We’ll be using Split function and then combine the string in Reverse order.This technique is recommended incase we wont our words order to reversed rather than each character

Example Code:-  


sRev = "UFTHELP, Ur First Testing Help"
Msgbox fnReverse(sRev)

Public Function fnReverse(sRev)
'Using Split function
arr = split(sRev, " ")

for i = Ubound(arr) to 0 Step -1
sNew = sNew & " " &arr(i)
next

fnReverse = sNew

End Function

Meaning of Web Service and Its Key components in SOAP-UI

Scenario :- Understanding concept of Web services, its working and what is a SOAP, UDDI , XML , UDDI . How we can implement SOAP-UI .


Web Service Flow
Web Service (Request-Response)




Solution :- This video tutorial is created which covers all the basic information of web service and its key components using SOAP -UI

Meaning of Web Service :-
Web services is a technology for transmitting data over the Internet and allowing programmatic access to that data using standard Internet protocols.

Key Components :-

SOAP:-Simple Object Access Protocol
 Defines the format of Web Service Request-Response (XML) 

WSDL 
Web Services Description Language Describing 
Web services and how to access them 

UDDI
Universal Description, Discovery and Integration 
Telephone book for web services

How to copy text from Notepad and Paste in Excel?

Copy Data from Notepad to ExcelScenario:-

How we can copy data from Notepad(Text File) into Excel.

Solution:-
We used very simple approach, firstly we’ll copy all the data from Notepad and than paste that to newly created excel.

Pre-requisites:- 
Create Notepad file and add data.(Change the path to your file in below code)
Excel used for adding data should not exists (Name conflict)

Code:-

Dim sData,sExcelPath,sNote
‘Path of Existing Notepad
sNote = “C:UsersDhesiDesktopTestNotepad.txt”
‘Path and Name for creating Excel file
sExcelPath = “C:UsersDhesiDesktoptest1.xls”

‘Calling function for Reading Data from Notepad
sData = fnReadData(sNote)

‘Calling function for Writing data into Excel
fnWriteData sData,sExcelPath
‘******************************Function for Reading********************

‘Function for Reading data from Notepad
Public Function fnReadData(sNote)
    ‘NotePad file already exists with data, we need to get all the present data
    Dim objFSO,objPad
    set objFSO =CreateObject(“Scripting.FileSystemObject”)
    ‘Opening and Reading the Data
    Set objPad = objFSO.OpenTextFile(sNote)
    sData = objPad.ReadAll()
    ‘Destroying the objects
    Set objFSO = Nothing
    Set objPad = Nothing
    fnReadData = sData
End Function
‘******************************Function for Writing********************
‘Function for Writing data into newly created Excel
Public Function fnWriteData(sData,sExcelPath)
    ‘Create an Excel file and paste data into this
    Set objExcel = createobject(“Excel.Application”)
    Set objWB = objExcel.Workbooks.Add()
    objExcel.Cells(1,1) = sData
    ‘Saving the workbook 
    objWB.saveAs(sExcelPath)
     ‘Quit the Excel and destroying the Excel object
    objExcel.Quit
    Set objWB = Nothing
    set objExcel=nothing

End Function


More Examples:-
Working with Notepad
Excel object Model

QTP Interview Questions

Ur First Testing Help



1.Why we use Automation Testing?

2.How we can Merge Object Repositories in QTP?

3.Please tell me the steps for connecting QTP with Database?

4.How we can copy text from Notepad and Paste in Excel?

5.What type of Framework you have worked?

6.Can we implement “Modular” Framework in “Keyword Driven” Framework?

7.Explain the latest Bug you have logged using QTP?

8.Describe the working code of Hybrid Framework?


Hints:-
1.Speed,Reliability, Human resource independent  accurate, Comprehensive ,Regression is easy 

2.Object Repository Manager, have tool called “Merge Repositories”

More Questions?

HP Unified Functional Testing Service Pack 11.52 is Released!

Latest Patch is available for UFT-11.50 up gradation.This patch (Service Pack 11.52) supersedes the previous UFT Service pack 11.51.

Service Pack 11.52



Download Link:-
http://support.openview.hp.com/selfsolve/document/LID/UFT_00022

Please find the below summary of patch by HP team:-

We strongly encourage our customers to upgrade to this latest release.

This service pack contains updates related to:

BPT in UFT –

Automation engineers can now work with the Business Process Testing framework from within the UFT IDE. This includes creating, editing, and running BPT tests and flows, giving them streamlined editing of a BPT test alongside its business component scripts within a single IDE.

Self-Check Tool– With this tool you can verify number of UFT’s installation details including: operating system and browser details, UFT version, add-ins and patch information, and other configuration settings.

Web-Based Help –
UFT Help is now provided in a more modern, Web-based format that matches the look and feel of the Help in your other HP products. This Help includes the product user guides, tutorials, and the Object Model Reference

GUI Testing functionality

  • We added the ‘Save with Resources’ command. With it, you can save everything you need to a local drive or to another storage device, making your ALM or network-based GUI Tests into portable ones. For example, this comes in handy when you need to create a portable copy of a test for use when traveling to other sites.
  • A new method was added for Insight objects: ClickSpecial to address special conditions (details in our documentation).
  • UFT now fully supports the .xlsx format of Excel files for importing data to the Data Table or when specifying an Excel file for use with ALM configurations.


API Testing functionality 

  • You can now import a Web Application Description Language (WADL) Document as part of your API test. 
  • The WADL hierarchy of services, resources and methods will be exposed in UFT for use in your tests.
  • A number of new features have been added to improve your ability to edit and use REST services in your test.You can now configure security for SOAP version 1.2.

Technologies

  • MS Windows 8 Support
  • New browser version support (including IE10, FF21)
  • SAP
    • Tighter integration with Solution Manager
    • New versions are supported for CRM, WDA, SAP Portal
    • New support for numerous SAP Web Dynpro ABAP controls
  • New Supported HTML 5 identification properties for WebEdit or CSS
  • Other updated technologies:
  • Dojo
  • PeopleSoft
  • Siebel
  • Terminal Emulators



In addition, this Service Pack addresses quality and performance issues found on top of 11.50 (major release) and SP1. This Service Pack is a mandatory update for all UFT 11.50/11.51 and Service Test 11.50/11.51 users.

More information is available in the Readme file and documentation provided with the installation.


Note:-User require Passport ID to login to the above link.(Sign up, if you don’t have)


QC/ALM integration Addin

Regression Testing v/s Re-Testing

Problem:– Understanding the difference between Regression and RE-Testing

Regression vs ReTesting
Example:-
Suppose you were testing some software application and you found defects in some 
component.

 1. You log a defect in bug tracking tool. 
2. Developer will fix that defect and provide you with the new build with bug fix.
3. You need to re-run the failed test cases to make sure that the previous logged issue is 
not replicating 
4.You are also testing some of the passed test-cases,so that bug fix in the new build is not affecting the neighboring components.

In the above example, STEP-3 refers to Re-Testing and STEP-4 Refers to Regression 
Testing

Following are the key  differences between Regression testing and Re-testing:-


Regression Testing

Re-Testing

Is carried to check that bug fix hasn’t 

impacted other functionality of 
application

Is carried to verify Bug fixes

Execution of Passed test cases

Execution of failed test cases

Has lower priority than re-testing


 Higher priority 

Trail version of UFT/QTP asks for License Key?

These days i got lot of queries regarding, “We are not able to install UFT/QTP trail version” and also after installation it asks for “License Key”.

Thus thought of sharing this article with automation lovers so that they are able to handle this issue.

Problem:– Trail version of UFT/QTP asks for License Key

Solution :- 
Please follow the following steps for installation of UFT, so that we are able to use the free trail version for 30 days, without providing any activation  key.

Step1:-Download the trail version ,extract the setup from ISO image, and click on “Setup.exe”.

Step2:- Let the  initial installation process i.e downloading and installation of pre-requiste for the setup, to complete(This process generally takes about 10-20 minutes based on the user system configuration)


Step3:-This is the crucial step, after the Step-2 , “Additional Installation Requirements” window opens, and this is the point where we make the mistake and install the setup with all the options selected.

Solution is  uncheck the “Run License Installation Wizard” option and continue with the installation.

HPUFT Additional  installation requirements
Uncheck the License option and click on Run 
HPUFT Additional  installation requirements Downloading
After the installation is finished click on Close button



Step4:– After this process completes, “Run Results viewer ” installation takes about 1 minute to install and our process completes and we can see the shortcut of HPUFT on our desktop.

HPUFT Run Results Viewer Installation
Result viewer installation 
HPUFT shortcut
HPUFT Shorcut


Step5:– Double click(Or run from Program files)  this shortcut to launch UFT for the first time, after the loading page , License warning page opens, click on Continue and enjoy the 30 day trail version.


hpuft License warning
Click on continue 


Paid license activation of UFT/QTP