1. H2Kinfosys USA : 770 777 1269
Email: training@h2kinfosys.com UK: (020) 3371 7615
QTP Interview Questions
Quick Test Professional
Now HP Unified Functional Testing Software which comes with QTP and Service Test Software.
HP Unified Functional Testing software
Complete automated testing toolset with best-in-class test management.
A single solution for testing GUIs and APIs
HP Unified Functional Testing software is industry-leading software that accelerates automated software
testing for both GUI and API applications, and also validates integrated test scenarios for hybrid
composite applications. Simplified test design and maintenance result in reduced risk and improved
quality for all your modern applications. HP Unified Functional Testing includes HP QuickTest
Professional (QTP) and HP Service Test software.
Key benefits:
Simplify test creation and maintenance with intuitive design approaches
Detect bugs earlier in the lifecycle by validating APIs
Implement automated testing for every major software application and environment
Use with HP Business Process Testing for a component-based testing framework
Integrate with HP Quality Center and ALM for comprehensive test management
1. How do you identify objects in a Java GUI
2. How do you call a function?
3. Difference between Java API call and Function Call
4. Have you designed any frame work, what framework i have used before
5. How will you do descriptive programming in Java
6 How will you identify the Objects properties in Java/Windows?
7. What frame work will you consider when you are testing a Java Application
8. How do you return a function in VB scripts?
9. Which is the fastest way to debug in QTP?
10. Check points in QTP
11. What is a data table in QTP?
12. Difference between QTP earlier ver. and QTP 10.0 What are new features in QTP 10.0 and QTP 11
What are documents used for automating the test scripts?.
Most of the time we use existing manual test cases and execute them 1st , understand then automate
them.
We can also develop test plan before we start automating.
Come with pseudo code for function libraries.
Develop frame work
Test data.
US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615
2. H2Kinfosys USA : 770 777 1269
Email: training@h2kinfosys.com UK: (020) 3371 7615
Make sure the QTP is able to handle the application.
Planning is the one before automate.
How to add vb script function libraries to QTP at run time.
code will add the library files:
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtLibraries 'As QuickTest.TestLibraries ' Declare a test's libraries collection variable
Dim lngPosition
' Open QuickTest
Set qtApp CreateObject( QuickTest.Application ) ' Create the Application object
qtApp.Launch ' Launch QuickTest
qtApp.Visible True ' Set QuickTest to be visible
' Open a test and get its libraries collection
qtApp.Open C:Test1 False False ' Open a test
Set qtLibraries qtApp.Test.Settings.Resources.Libraries ' Get the libraries collection object
' Add Utilities.vbs if it's not in the collection
If qtLibraries.Find( C:sai1.vbs ) -1 Then ' If the library cannot be found in the collection
qtLibraries.Add C:sai1.vbs 1 ' Add the library to the collection
End If
How to send email from QTP
How to call this below function : SendEmail( "Rao.h2kinfosys@gmail.com", "test@gmail.com", "Auto
Email: TestResults.", " This email is generated Automation scripts ", ResultsFilename)
================================
Public Sub SendEmail(sFromMailId, sToList, sCCList, sSubject,sMsg, aAttachments)
Const gcsSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
'Const gcsSendUsingMethod = 1
Const gciSendUsingPort = 2
'Const gciSendUsingPort = 2
'Use basic (clear-text) authentication.
Const cdoBasic = 1
US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615
3. H2Kinfosys USA : 770 777 1269
Email: training@h2kinfosys.com UK: (020) 3371 7615
' Use NTLM authentication
Const cdoNTLM = 2 'NTLM
Const gcsSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const gcsSMTPServerIp = "11.444.63.454"
Set oCDOMsg = CreateObject("CDO.Message")
Set oCDOConf = CreateObject("CDO.Configuration")
Set oConfField = oCDOConf.Fields
With oConfField
.Item(gcsSendUsingMethod) = gciSendUsingPort
.Item(gcsSMTPServer) = gcsSMTPServerIp
.Update
End With
With oCDOMsg
Set .Configuration = oCDOConf
.From = sFromMailId
.To = sToList
.CC = sCCList
.Subject = sSubject
.HTMLBody = sMsg
End With
If Not(IsArray(aAttachments)) Then
aAttachments = Split(aAttachments, ";")
End If
If (aAttachments(0) <> "") Then
For i=0 To Ubound(aAttachments)
Call oCDOMsg.AddAttachment(aAttachments(i))
Next
End If
oCDOMsg.Send
Set oCDOMsg = Nothing
Set oCDOConf = Nothing
Set oConfField = Nothing
'On Error Goto 0
End Sub 'SendEmail
H2KInfosys <h2kinfosys@gmail.com>
US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615
4. H2Kinfosys USA : 770 777 1269
Email: training@h2kinfosys.com UK: (020) 3371 7615
Q) Do you know how to post the Webservices WSDL file using QTP Script ?
Ans: YEs. I can create object using WinHttp.WinHttpReques
Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
WinHttpReq.Open "POST", strURL, True
Q2 ) Steps to access the data from database ?
ANS: 1. creating connection object
Set adoConn = CreateObject("ADODB.Connection")
2. open the database connection
3. create resultset object by execute method and pass the SQL query
4. In while loop until EOF ( end of File) get each column value and process as needed as per the
requirement.
at the end close the record set and database connection.
<Environment>
<Variable>
<Name>ApplicationPath</Name>
<Value>C:ProgramFilesApplicationLocation</Value>
</Variable>
<Variable>
<Name>TestData</Name>
<Value>C:MyApplicationTestdata.xls</Value>
</Variable>
<Variable>
<Name>FlightAppFunctionLibs</Name>
<Value>C:MyFlightAppFunctions</Value>
</Variable>
</Environment>
Driver Script ( It is QTP Script File )
Environment.LoadFromFile("[Quality CenterResources] ResourcesEnvironmentVarriables.xml")
ExecuteFile( Environment.Value("FlightAppFunctionLibs") & "Flight_Common.vbs")
C:MyFlightAppFunctionsFlight_Common.vbs
Call CreateFlightTicket()
US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615
5. H2Kinfosys USA : 770 777 1269
Email: training@h2kinfosys.com UK: (020) 3371 7615
Related products
HP Application Lifecycle Management
A unified software platform for accelerating the delivery of secure, reliable, modern applications
HP Business Process Testing softwareComponent-based testing framework that accelerates
test creation and reduces test maintenance
HP Quality Center Software
Achieve consistent IT quality management processes and software quality assurance
HP Service Test softwareStart testing services with a few clicks of a mouse
HP Service VirtualizationGive developers and testers access to limited or unavailable
services
Related services
HP Application Lifecycle Management Consulting
Expert testing, design, implementation and education services and innovative delivery models for HP
ALM
HP Testing as a ServiceCheaper than in-house testing, higher service-level compliance and
fewer defects
<<<<<< =================== >>>>>>
H2K Infosys is business based in Atlanta, Georgia – United States
Providing Online IT training services world wide.
www.H2KINFOSYS.com
USA - +1-(770)-777-1269, UK - (020) 3371 7615
Training@H2KInfosys.com / H2KInfosys@Gmail.com
100% Job Oriented Instructor Led Face2Face True Live online Software Training +
Cloud Test Lab with Software Tools & Live Project work +
Mock Interviews + Resume Prep & Review +
Job Placement assistance
=
Best IT training Center Trusted by many students worldwide.
US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615