Basic QTP interview Questions and answers for Freshers

Hello Guys - on this page you will find frequently asked QTP interview questions for freshers  in MNCs like Cognizant, Infosys, TCS, Wipro, HCL, Mindtree, Tech Mahindra, Igate, Capgemini, Accenture etc.

Here is the list of top 50/100 QTP interview Questions for freshers.

Q1. What is the latest version of QTP in the market?
Answer - Latest stable version of QTP is 11.

Q2. What is Environment Variable in QTP and why to use it?
Answer - Environment variables are global variables in QTP and they are used to store the global values like User Id, password of the APP. There are 2 types of variables 1. Built-in 2.User Defined.

Q3. What is the difference between local and shared Object Repository in QTP?
Answer - Local object Repository is associated with particular action. While Shared object repository is independent of action. We can associate the shared object repository to current test.

Q4. What is the default object synchronization timeout in QTP?
Answer -The default object synchronization in QTP is 20 seconds.

Q5. What do you mean by checkpoints in QTP?
Answer - Checkpoints are nothing but verification points in QTP. We can verify if particular property of the object has specified value in checkpoints.

Q6. How to check which add-ins are associated with a test in QTP?
Answer - To see which add ins are associated with the test in QTP, you have to open the test settings in QTP and then select properties of test. There you will find the list of add-ins that are associated with the test.

Q7. How to find the path of folder in which test is saved  in QTP?
Answer -To get the path of the test you can access built-in environment variable called "TestDir"

Q8. How to find the name of machine where you are running your automation scripts in  QTP?
Answer -To get the name of machine, you can access built-in environment variable called "LocalHostName" 

Q9. What is the extension of Recovery Scenario file in QTP?
Answer - Recovery Scenarios in QTP are saved in file with extension .qrs which stands for quicktest recovery scenario. In one qrs file you can have multiple scenarios defined in it.

Q10. What is the extension of shared object repository in QTP?
Answer - Shared object repository in QTP is stored in .tsr file. You create .tsr file using export option in local repository. To edit .tsr file you have to open .tsr file in object repository manager and then modify it.

Q11. How to associate shared object repository to test  in QTP?
Answer -To associate shared object repository you have to go to Resources->Associate Repositories option and then choose and select the .tsr file and associate it with particular or all actions in test.

Q12. How to merge 2 shared object repositories in  QTP?
Answer -To merge 2 shared object repositories in QTP, you have to open object repository manager tool and then select merge tool in Tools menu.

Q13. What is the use of object spy tool in QTP?
Answer -QTP provides one tool called object spy that can be used to find out the properties and the values of the object in QTP.

Q14. How to find the length of string in QTP?
Answer -You can find the length of the string using one vb script function called len.
Suppose you want to find the length of "salunke" then you will have the below statement which will print the length of string .
print len("salunke")

Q15. How to find the current system time in QTP?
Answer - You can find the current system time using Time function in vbscript.
Print time

Q16. How to Comment a line in QTP script?
Answer - You can comment the line using rem or '.
' this line is commented.
rem this line is also commented.

Q17. What is the difference between QTP and Selenium?
Answer - QTP is not open source tool while Selenium is open source tool.
We can use QTP to test different kinds of applications like web, .net, java, mainframe, peoplesoft etc.
But Selenium is used only for Web application testing. QTP supports only vb script as language but we can develop selenium scripts using JAVA, .Net, Ruby, Perl etc.

Q18. How to remove all spaces from given string in QTP?
Answer - We can use replace function in vbscript to remove all spaces in string.
e.g. newstring = replace(stringwithspaces," ","")

Q19. How to find the modulus of a number in QTP?
Answer - We can find the modulus of given number using MOD operator.
a = 10 mod 5
print a

Q20. How to find the length of array in QTP?
Answer - To find the length of array, we can use ubound function in QTP.
print ubound(arr)  - 'prints upper bound of array.

Q21. What is difference between byref and byval in QTP?
Answer - You can pass the parameters to function or procedure using byref or byval method.
byref will pass the address of variable but byval will pass the copy of variable. So when you want the passed value to change, you can pass the value using byref method. Otherwise you can pass it using byval method.

Q22. How to find the difference between 2 dates in QTP?
Answer - You can find the difference between 2 dates using datediff function. You can get the difference in terms of minutes, seconds, hours, months or years.

Q23. How to check if given variable is scalar or array in QTP?
Answer - You can use Isarray function to check if variable is array or not.
abc = IsArray(vartotest)
If vattotest is array variable, abc will contain true else false.


The list of Software (IT) Companies in Which above QTP interview Questions are asked is given below.

3i Infotech , Accel Frontline Ltd , Accenture , Aditi Technologies , Adobe Systems , ADP , Adrenalin eSystems , AES Technologies  , Affiliated Computer Services , Aftek , Agilent Technologies , Allianz , Amazon , Amdocs , American Megatrends India , Anantara Solutions , Aptech , Arbitron , Aricent Group , Aspire Systems , Atom Technologies , Atos , Avaya , BancBox  , Barclays  , BatchMaster , BirlaSoft , Blackberry , Bluestar , BMC  , Brahma Vision  , Cadence Design Systems , Canon , Capgemini , Capita , C-DAC , CGI Group , Cisco Systems , CMC Limited , CMC Ltd , Cognizant , Comat Technologies , Computer Associates , Computer Sciences Corporation(CSC) , Comviva , Conexant Systems , CoWare , Cybage , Cynapse , D. E. Shaw Research , Datamatics  , Dell , Deloitte , Directi , eBay , Eclerx , Ernst & Young , Essar , Etisalat DB Telecom , Evergreen  , EXL Service , Fab.com , Facebook , FactSet  , Firstsource , Fiserv , Fujitsu , Future Group , Genpact , Geometric , GlobalLogic , Google , Harbinger , HCL  , Headstrong , Hewitt Associates , Hexaware , Hitachi Consulting , Honeywell , Hsbc , IBM , Iflex , iGate , Iken Solutions , Impetus Technologies , Infinite Computer Solutions , Infosys , Infotech Enterprises , Infrasoft Technologies Ltd , Ingram Micro , Intec , Intergraph , Investis , ITC Infotech , Ixia , JP Morgan , Kayako , KPIT Cummins , Larsen & Toubro , Lenovo , Lexmark , Lionbridge , Logica , Mahindra Satyam , Mastek , McKinsey , MediaTek , Melstar Information Technologies , Microland , Micromax Mobile , Microsoft , Mindfire Solutions , MindTree , MobME , Monsoon HAVA , MphasiS , Ness Technologies , NeST Software , Network Solutions , NIIT , Nokia Siemens , Novartis , NTT Data , Nvidia , NVISH , Omnitech  , Onward , Oracle , Patni  , PayPal , Persistent Systems , PGMS  , Pitney Bowes , Polaris  , Pramati Technologies , QuinStreet , R Systems Ltd , Ramco Systems , Red Hat  , Rediff.com , Redington , Reliance , Robert Bosch , Rolta  , RR Donnelley , SafeNet , Samsung  , Sankalp Semiconductor , Sapient  , Sasken , Serco , Siemens , Sonata Software , Sopra Group , STMicroelectronics , SunGard , SunTec  , Surat , Sutherland , SUVI  , Sybase , Symantec , Symbiosis , Symphony , SynapseIndia , Synechron , Synopsys , Syntel , Tally Solutions , Tata Consultancy Services , Tech Mahindra , Tejas Networks , Telcon Construction Solutions , Teradata , Thirdware , ThoughtWorks , Tibco , Tieto , Toonz , UST Global , Verizon  , Virtusa , Wipro , WNS , Xansa , Xavient , Xerox ACS , Yash Technoloies , Zenith Computers , Zensar Technologies , ZOHO Corporation , ZS Associates



The list of Investment Banks in Which above QTP interview Questions are asked is given below.

Goldman Sachs
Morgan Stanley
PMorgan Chase
Bank of America
Merrill Lynch
Deutsche Bank
Citigroup
Credit Suisse
Barclays Capital
UBS
HSBC
Nomura Holdings
RBC Capital Markets
BNP Paribas
The Royal Bank of Scotland Group
TD Securities
Wells Fargo
Lazard
Jefferies Group
Société Générale
BMO Capital Markets


I am going to add more basic QTP questions for freshers in this list. If you think that I am missing any QTP interview question then you can inform me by posting the comment below. Thanks for reading this blog.


You may also like -
  1. QTP Questions and Answers for Experienced guys
  2. Advanced QTP Questions and answers
  3. Advanced QTP Tutorial
Dear friend -  What do you think about this topic? Please express your thoughts via comment box.

No comments:

Post a Comment

Please Leave your reply. We value your feedback and inputs

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.