Tuesday 12 June 2012

QTP Expert Questions and Answer

Question: Which features of QTP would like to see changed, dropped or included in the next versions of QTP?
Rajesh U:
  • Changed: The Step Generator. It does a wonderful job of creating the correct syntax for generating a line of code. However the interface requires too many mouse clicks.
  • Included: A common startup script generation interface. It’s half there right now, but divided up into three areas, without much documentation on how to effectively implement them. Test Design Studio has wonderful complimentary startup script templates for just this reason.
  • Dropped: Virtual objects.
Question: What is the toughest QTP challenge that you have faced?
Rajesh U: The biggest challenge in any test automation project is getting and maintaining "Buy in". You may find that developers who are unfamiliar with QTP liken it to a "Toy" as compared to their "Tools". If you find something subtle occuring in their application, they are more likely to point to your automation tool as the culprit. If that had been true, I would not have gotten much farther in my career beyond my initial WinRunner proof of concept. Then you have the fear of your manual tester co-workers who think you Rajesh U automate them out of a job. Once they realize test automation does have it’s limits, and works better to compliment their capabilities, they often embrace it. Particularly when it replaces some of the tedious work no one like to do. Lastly, you need to maintain the Buy-In of Management. That is only accomplished by demonstrating a Return on Investment from a history of metrics.
Question: Let’s say you have to hire someone for a junior and another for a senior role in QTP. What questions and answers Rajesh U set apart a senior position from a junior one?
Rajesh U: Unfortunately, I can’t share specifics of the questions and expected answers that separate the best from the rest. This is a very popular forum and I would rather not risk having my knock off questions memorized.
But in general, in a Junior role, I look for someone with practical experience who can demonstrate an understanding of basic programming skills in the tool of choice. They should be familiar with commonly held best practices, and can describe how they benefit their code design, as well as a test automation project.
In a Senior role, I look for someone who can describe what Rajesh U cause an automation project to fail. I know, it’s the last thing you would expect to talk about in an interview, right? They should be able identify procedures they follow to avoid these pitfalls. I also look for creative use of the tools that extend outside the scope of testing. They should know regular expressions, give solid examples of their use.
Question: Which feature of QTP was your most recent discovery?
Rajesh U: System resource tracking with QTP 10.0. My first project benefited our Development by quickly identifying memory leaks in the application, almost exclusivly. It bought me a lot of "street cred" with them. But I had to roll my own functions to pull it off at the time. Now it’s built in.
Question: What according to you are the key elements of a robust QTP automation framework?
Rajesh U:
  1. Simple abstraction that hides the complexity of the framework and takes advantage of reusable code.
  2. Scalability from parameterized values to allow larger sets of test data to be run unattended.
  3. Recover from instability, allowing tests to execute unattended even when objects are not found and msgbox debugging statements remain in the code.
Question: How significant is QTP certification to you when you’re screening candidates for a QTP tester position?
Rajesh U: I am a certified HP Instructor and hold an HP ASE QC 9.2 (QTP 9.2) certification. I have held several Mercury certifications since 2002 including CPS and CPC. Although the delivery of certification exams has improved over the years from the initial two-month take home exam, the depth of the exam has diminished slightly. I had to discover how to self-terminate the WinRunner application on my initial exam, which Mercury publicly stated was not possible in their Knowledge Base articles. However, having a certification should not be equated with getting a pass in the interview screening process. In fact, certified individuals should be expected to perform better during an interview. The certification can allow you to command a higher bill rate or salary. But in the end, you need to back it up with experience to land the job.
Question: What would you recommend as the best way to learn QTP?
Rajesh U:
  1. Start by trying to automate something fun. Automation is code development and code development is not for everyone. It’s like learning to effectivly perform a French Drop to make a coin appear to vanish from your palm, or eating an entire meal, rice included, with chopsticks. It takes practice, practice, practice.
  2. Get a great mentor. Mine were Linda Hayes, Jaime Mitchel and Dr. Magdy Hanna.
  3. Hang with the experts. SoftwareInquisition.com, AdvancedQTP.com, TDForums.com to name a few.
Question: If you could introduce one new feature in the next version of QTP, what would it be?
Rajesh U: Only one new feature?  There are too many to choose from.  The one feature that would have the biggest impact on my day-to-day testing would be a run-time license.  With HP’s current license scheme, we can’t afford a lot of licenses to run our tests.  It takes several hours to run our entire suite of regression tests and uses up all of our QTP licenses.  If HP offered a run-time license — one that only allowed executing tests, not editing, writing or debugging — for a price in the sub $1,000 range, we could afford to add several new machines that are dedicated to running regressions tests.  That would give us faster test execution time and allow us to continue writing new tests while the regression tests run.
Question: What is the toughest QTP challenge that you have faced?
Rajesh U: My toughest QTP challenge is the same challenge we all face continually.  How do we create maintainable tests that produce meaningful and reliable results from one software release to the next?  Like most people here, my first QTP test was a record-and-playback script that errored out the second time it ran. That started the challenge to create better tests.  I’ve made pretty good progress on this challenge, but there is still a lot left to do.

Question: Let’s say you are interviewing someone for a position of QTP test lead, and you can only ask 5 questions  to gauge the candidate’s knowledge. What are the 5 questions you would ask?
Rajesh U: We are talking about a candidate for a test lead position.  I am looking for somebody whose knowledge goes beyond QTP.  I want somebody who understands the fundamentals of software testing and can express an informed opinion of how test automation should be practiced.
  1. Many software developers follow the one-assert-per-test rule in their unit tests in order to keep their tests maintainable.  Do you think functional testing should follow a similar rule?  What would the benefits and drawbacks be?
  2. We frequently get requests from our manual testers to automate some of their manual tests.  What types of tests should be left to manual testers and what is best handled by automation?
  3. Tell me what programming languages you’ve used and how they compare with QTP and vbscript.
  4. What are the benefits and drawbacks of descriptive programming vs a shared object repository?
  5. If you were told to test whether every three word combination from a list of five words returns at least 1,000 results when googled, how would you approach that?

Question: Which feature of QTP was your most recent discovery?
Rajesh U: Web Extensibility is my favorite new feature in QTP.  Using a custom Web Extensibility Add-In we wrote for our AUT, we have seen a huge performance gain.  It also makes our vbscript code a lot cleaner. As for my most recent discover, that is probably the hidden init method which I blogged about on SoftwareInquisition.  This is such a handy feature that I can’t believe I went all these years without it.

Question: How significant is QTP certification to you when you’re screening candidates for a QTP tester position?
Rajesh U: I don’t know anything about the QTP certification, so I can’t talk about it directly.  I can give you some of my thoughts on certifications in general.
During my previous career in IT, I got two certifications: MCSE and CCNA.  The MCSE I got after working two years as a Windows SysAdmin.  I bought and read the books at home and took one test per week for six weeks.  Even though I was already an experienced SysAdmin, I learned a lot during the certification process, and I used that new knowledge in my job.
The CCNA was a different experience entirely.  I worked at Cisco Systems at the time, and they offered me the opportunity to go to a week-long CCNA training session that ended with taking the certification exam.  I had little experience with routers, I just knew enough to enable an interface and change an ip address.  During that week I learned enough to pass the exam, and after the test I forgot most of what I had learned.  Aside from having a certification to add to my resume, the whole experience amounted to nothing.
Given my mixed experience with certifications, I tend to view the skeptically.  If I see QTP certification on a resume with no other QTP experience, I give it no thought at all.  If I see it on a resume with other QTP experience, I Rajesh U be inclined to ask for an interview.  On the other hand, the experience by itself would be enough to get an interview.

Question: Please give a message for beginners in QTP.
Rajesh U: Don’t stay a QTP beginner for too long.  Learn everything you can about descriptive programming.  Learn the pitfalls of checkpoints and record-and-playback testing early.  Avoid repeating the mistakes you see people discussing on the various testing forums.  If you think there is a better way to write a test, then try it.  That is how you learn what works and what doesn’t.
Question: If you could introduce one new feature in the next version of QTP, what would it be?
Rajesh U: There are lots of feature I can think of which are currently missing in QTP. But the most important one in my opinion is to be able debug libraries loaded at run-time. Currently lot of time gets wasted in debugging scripts and complex frameworks are all based on loading stuff at run-time.
Question: What is the toughest QTP challenge that you have faced?
Rajesh U: There have been lots of challenges that I have faced in QTP. When I started using QTP the community was not huge and there was a lot of stuff to be learned and taught. Every day, every query, every project has brought new challenges, new solutions and new learning for me. I doubt I can mark any one of them as the toughest one.
Question: Let’s say you are interviewing someone for a position of QTP test lead, and you can only ask 5 questions  to gauge the candidate’s knowledge. What are the 5 questions you would ask?
Rajesh U: 5 questions are bit too less for me to judge a candidate. But I would mostly split my questions in different categories. Here are the questions that I would mostly ask and the objective behind my questions
1. From which version of QTP did you start using the tool? Which is the latest one? What new features were introduced between the successive versions?
This question would help me judge how closely a candidate follows the new upgrades and their analyses on the same. Though it is pretty much easy for any non-deserving candidate to just remember and answer the query, but we can grill down on the features discussed
2. How does QTP identify objects? What is Object Repository (OR)? Types of Object Repository? How to load OR at run-time? Why, When & How of Descriptive Programming (DP)? You prefer DP or OR, why? What all add-ins have you worked with? How to work with custom controls? What are libraries? How to load the libraries at run-time? How to debug code in QTP?
This question would help me judge how well the candidate understands working of QTP. It is not only important for a person to know the practical stuff but also to know the theory behind that. There are many QTP programmers who know how to do things but don’t know why it is done that way
3. What projects have you worked on? Have you already lead a Team on Automation? Challenges faced in the project? What solutions were implemented? What solutions could not be implemented? How many times you have contacted HP Support and for what kind of issues? Do you refer to any blog or forum regularly? Have you ever helped others on any forum? Presenting a new application to the candidate and asking on what would be the path forward to propose and implement Automation of the application
Since the candidate is applying for a Test Lead role it is important for us to know whether he can do projects in an approached manner or not. Also presenting a new hypothetical application case which can present problems like Test Data dynamics, Application versioning, Parallel release etc… Rajesh U help judge his/her solution making capabilities.
4. What is difference between VBScript and QTP? Can we run QTP code in VBScript? Can we run VBScript code in QTP? Can we use any other scripting language in QTP? Which programming or scripting language other than VBScript would you have preferred for QTP coding and why? A practical problem on VBscript which tests candidates knowledge of various methods of VBScript
This question helps judge understanding of the candidate on VBScript. It is utmost important for one to understand difference between Plain VBScript and QTP, being able to do so makes it easier to resolve issues while doing Automation
5. You think you have made it?
It is very important for one to be able to self-access himself/herself. Everyone in this world makes mistakes, but if one can catch and rectify it early that always helps. Nobody is perfect in this world, but only those who know what they lack and where they need to improve come out to be true champions.
Question: Which feature of QTP was your most recent discovery?
Rajesh U: The feature that I found out recently was to be able to change variables value from the Watch tab itself. I used to do this from the command tab earlier.

Question: How significant is QTP certification to you when you’re screening candidates for a QTP tester position?
Rajesh U: I am not QTP certified and I never plan to be one. It does not matter to me if the candidate I am interviewing is certified or not.
Question: Please give a message for beginners in QTP.
Rajesh U: Read & learn & implement as much as you can. No one becomes an expert in a day. It takes years of hard work to be the best in your field. Here is how I did it – When I started learning QTP I didn’t had the tool with me, I just used to read the help file at home and before I started working on the tool I knew every single feature of the same. The usual approach of learning is to start playing with the tool and learn while solving issues, but having knowledge of various features available on hand before starting with tool helps a lot. With over 11100+ replies on SQAForum I have only asked 10 questions on the forum. If you have any question, first search for the answer yourself before asking anyone. I spend days of effort to search solutions to my queries and queries other people ask. That to me has been the key to success.
Question: If you could introduce one new feature in the next version of QTP, what would it be?
Rajesh U: The ability to write tests in VB.Net
Question: What is the toughest QTP challenge that you have faced?
Rajesh U: Automating Geo-tools and maps. Several of my projects have ESRI map controls on them; and building smart Geo automation has really took all of my creativity.
Question: Let’s say you are interviewing someone for a position of QTP test lead, and you can only ask 5 questions  to gauge the candidate’s knowledge. What are the 5 questions you would ask?
Rajesh U: These would’ve been the questions (assuming I’m targeting a highly professional position):
Q1. You don’t know how many WebEdits are in a page, but you have to fill them all up. How can you do that?
A1. Using Descriptive Programming with .ChildObjects to get the objects, then looping through them
Q2. How would you automate a non-standard web / java / .net control?
A2. Use object exploration techniques in the Runtime-Object level
Q3. You are given a sealed script, to which you’re supposed to add the following functionality – whenever a combobox is inputed, a report should be made to the log. How would you achieve that?
A3. Through RegisterUserFunc – overrun the combobox’s default Select method.
Q4. Build a class wrapper for some application screen / page.
A4. I would see how you approach the problem – Do you put enough emphasis on robustness, common design principles, and do you know how to work with classes.
Q5. I would ask you to analyze a piece of code, and tell me what it does.
A5. This is to see how fast can you learn new, unfamiliar code.
Question: Which feature of QTP was your most recent discovery?
Rajesh U: I only recently worked out a way to write QTP tests in Visual Studio .Net. It took some hard work and ugly workarounds, but it works!
Question: How significant is QTP certification to you when you’re screening candidates for a QTP tester position?
Rajesh U: Absolutely no significant whatsoever. I would much rather hire someone with real programming experience / course (or even just a gift for technology and logical thinking), than HP’s poor excuse for a certification.
Question: Please give a message for beginners in QTP.
Rajesh U: QTP is just a tool. Invest your time in learning about programming, design patterns and logical thinking, and you’ll become an extremely competent QTP engineer. Also – Don’t let the hard work discourage you. Even the world’s top QTP experts were once in your shoes – motivation, determination and hard work Rajesh U always get you through – just don’t give up mid-way!

5 comments:

  1. The above knowledge is very good but the same set of questions and answers are repeated which is quite frustrating and least expected from a good forum . It would be great if more and more set of knowledge is provided

    ReplyDelete
  2. In my application calender image is present which is web element after selecting date from calendar image it will be displayed in editbox( non-editable date field) and i want to parameterize date from calendar image how to do in QTP? can u pls help me?

    ReplyDelete
  3. want one answer?

    As QTP has it own data table...then why we as QTP automation tester prefer to use Excel for passing data over data table?

    ReplyDelete


  4. My name is Leah Brown, I'm a happy woman today? I told myself that any loan lender that could change my life and that of my family after having been scammed separately by these online loan lenders, I will refer to anyone who is looking for loan for them. It gave me and my family happiness, although at first I had a hard time trusting him because of my experiences with past loan lenders, I needed a loan of $300,000.00 to start my life everywhere as single mother with 2 children, I met this honest and God fearing online loan lender Gain Credit Loan who helped me with a $300,000.00 loan, working with a loan company Good reputation. If you are in need of a loan and you are 100% sure of paying the loan please contact (gaincreditloan1@gmail.com)

    ReplyDelete