SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
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
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
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
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
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

Weitere Àhnliche Inhalte

Mehr von H2Kinfosys

Test plan cyclos
Test plan cyclosTest plan cyclos
Test plan cyclosH2Kinfosys
 
HealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelinesHealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelinesH2Kinfosys
 
Letters test cases
Letters test casesLetters test cases
Letters test casesH2Kinfosys
 
Health Care Project Testing Process
Health Care Project Testing ProcessHealth Care Project Testing Process
Health Care Project Testing ProcessH2Kinfosys
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan TemplateH2Kinfosys
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan TemplateH2Kinfosys
 
ETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersH2Kinfosys
 
CRM Project - H2Kinfosys
CRM Project - H2KinfosysCRM Project - H2Kinfosys
CRM Project - H2KinfosysH2Kinfosys
 
Online Banking Business Requirement Document
Online Banking Business Requirement DocumentOnline Banking Business Requirement Document
Online Banking Business Requirement DocumentH2Kinfosys
 
Online Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement DcoumentOnline Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement DcoumentH2Kinfosys
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With AnswersH2Kinfosys
 
Basic Interview Questions
Basic Interview QuestionsBasic Interview Questions
Basic Interview QuestionsH2Kinfosys
 
SDLC software testing
SDLC software testingSDLC software testing
SDLC software testingH2Kinfosys
 

Mehr von H2Kinfosys (13)

Test plan cyclos
Test plan cyclosTest plan cyclos
Test plan cyclos
 
HealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelinesHealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelines
 
Letters test cases
Letters test casesLetters test cases
Letters test cases
 
Health Care Project Testing Process
Health Care Project Testing ProcessHealth Care Project Testing Process
Health Care Project Testing Process
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan Template
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan Template
 
ETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersETL Testing Interview Questions and Answers
ETL Testing Interview Questions and Answers
 
CRM Project - H2Kinfosys
CRM Project - H2KinfosysCRM Project - H2Kinfosys
CRM Project - H2Kinfosys
 
Online Banking Business Requirement Document
Online Banking Business Requirement DocumentOnline Banking Business Requirement Document
Online Banking Business Requirement Document
 
Online Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement DcoumentOnline Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement Dcoument
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With Answers
 
Basic Interview Questions
Basic Interview QuestionsBasic Interview Questions
Basic Interview Questions
 
SDLC software testing
SDLC software testingSDLC software testing
SDLC software testing
 

KĂŒrzlich hochgeladen

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...gurkirankumar98700
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

KĂŒrzlich hochgeladen (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

QTP Interview Questions 2012

  • 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