H2Kinfosys                                                                        USA : 770 777 1269Email: training@h2kinf...
H2Kinfosys                                                                              USA : 770 777 1269Email: training@...
H2Kinfosys                                                                        USA : 770 777 1269Email: training@h2kinf...
H2Kinfosys                                                                        USA : 770 777 1269Email: training@h2kinf...
H2Kinfosys                                                                           USA : 770 777 1269    Email: training...
Upcoming SlideShare
Loading in …5

QTP Interview Questions 2012


Published on

QTP latest Interview Questions and top faq's in QTP from software testing experts. H2Kinfosys leading I.T. Training providers with live projects.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

QTP Interview Questions 2012

  1. 1. H2Kinfosys USA : 770 777 1269Email: 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 softwareComplete automated testing toolset with best-in-class test management.A single solution for testing GUIs and APIsHP Unified Functional Testing software is industry-leading software that accelerates automated softwaretesting for both GUI and API applications, and also validates integrated test scenarios for hybridcomposite applications. Simplified test design and maintenance result in reduced risk and improvedquality for all your modern applications. HP Unified Functional Testing includes HP QuickTestProfessional (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 management1. How do you identify objects in a Java GUI2. How do you call a function?3. Difference between Java API call and Function Call4. Have you designed any frame work, what framework i have used before5. How will you do descriptive programming in Java6 How will you identify the Objects properties in Java/Windows?7. What frame work will you consider when you are testing a Java Application8. How do you return a function in VB scripts?9. Which is the fastest way to debug in QTP?10. Check points in QTP11. 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 11What are documents used for automating the test scripts?.Most of the time we use existing manual test cases and execute them 1st , understand then automatethem.We can also develop test plan before we start automating.Come with pseudo code for function libraries.Develop frame workTest data. US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615
  2. 2. H2Kinfosys USA : 770 777 1269Email: training@h2kinfosys.com UK: (020) 3371 7615Make 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 variableDim qtLibraries As QuickTest.TestLibraries Declare a tests libraries collection variableDim lngPosition Open QuickTestSet qtApp CreateObject( QuickTest.Application ) Create the Application objectqtApp.Launch Launch QuickTestqtApp.Visible True Set QuickTest to be visible Open a test and get its libraries collectionqtApp.Open C:Test1 False False Open a testSet qtLibraries qtApp.Test.Settings.Resources.Libraries Get the libraries collection object Add Utilities.vbs if its not in the collectionIf qtLibraries.Find( C:sai1.vbs ) -1 Then If the library cannot be found in the collectionqtLibraries.Add C:sai1.vbs 1 Add the library to the collectionEnd IfHow to send email from QTPHow to call this below function : SendEmail( "Rao.h2kinfosys@gmail.com", "test@gmail.com", "AutoEmail: 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 = 1Const gciSendUsingPort = 2Const 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. 3. H2Kinfosys USA : 770 777 1269Email: training@h2kinfosys.com UK: (020) 3371 7615 Use NTLM authenticationConst cdoNTLM = 2 NTLMConst 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 = NothingOn Error Goto 0End Sub SendEmailH2KInfosys <h2kinfosys@gmail.com> US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615
  4. 4. H2Kinfosys USA : 770 777 1269Email: training@h2kinfosys.com UK: (020) 3371 7615Q) 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, TrueQ2 ) 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.vbsCall CreateFlightTicket() US: (770) 777 1269 | www.H2Kinfosys.com | Email: training@h2kinfosys.com | UK: (020) 3371 7615
  5. 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