Best Software Testing Tools

In Early Days,  Software Testing Tools are very demand and very less in the market. Nowadays there are many tools available in market like Commercial tools and Open Source Tools.  Find below the list of Software Testing Tools.

The tools are divided into different categories as follows:

  •  Test Management tools
  •  Functional Testing Tools
  •  Load Testing Tools or Performance Testing tools

Find below the list of Testing Tools  that are  Top and Best Tools in both Open Source (Free Tools) and Commercial Tools used by the Testers for testing software applications.

Open Source Tools:

a) Test Management Tools

b) Functional Testing Tools

c) Load Testing Tools

Commercial Testing Tools:

a) Test Management Tools

b) Functional Testing Tools

c) Load Testing Tools

All-in One  Testing Tools

  • Test Studio – An advanced tool for performance, load, automated testing, test management, exploratory testing

Mobile Testing Tools

  • Testdroid-Automated Testing Tool for Android.

If any of the important testing Tools is missing from this list, you can mention it thro’ the comments.

Software Testing Questions and Answers

Find the answers at the end of the questions.

1) The approach/document used to make sure all the requirements are covered when writing test cases
a) Test Matrix b) Checklist c) Test bed d) Traceability Matrix


2) Executing the same test case by giving the number of inputs on same build called as a) Regression Testing b) ReTesting c) Ad hoc Testing d) Sanity Testing


3) Control Charts is a statistical technique to assess, monitor, and maintain the stability of a process. a) True b) False


4) To check whether we are developing the right product according to the customer requirements are not. It is a static process a) Validation b) Verification c) Quality Assurance d) Quality Control


5) To check whether we have developed the product according to the customer requirements r not. It is a Dynamic process. a) Validation b) Verification c) Quality Assurance d) Quality Control


6) Staff development plan describes how the skills and experience of the project team members will be developed. a) True b) False


7) It is a set of levels that defines a testing maturity hierarchy a) TIM (Testing Improving Model) b) TMM (Testing Maturity Model) c) TQM(Total Quality Management)


8) A Non-Functional Software testing done to check if the user interface is easy to use and understand a) Usability Testing b) Security Testing c) Unit testing d) Block Box Testing


9) The review and approved document (i.e. Test plan, System Requirement Specification’s) is called as a) Delivery Document b) Baseline Document c) Checklist


10) What are the Testing Levels? a) Unit Testing b) Integration Testing c) System Testing and Acceptance Testing. d) All the above


11) Cost of quality = Prevention Cost + Appraisal cost + Failure cost a) True b) False


12) A useful tool to visualize, clarify, link, identify, and classify possible cause of a problem. This is also called as “fishbone diagram” what is this? a) Pareto Analysis b) Cause-and-Effect Diagram


13) It measures the quality of processes used to create a quality product.
It is a system of management activities,
It is a preventive process, It applies for entire life cycle & Deals with Process. a) Validation b) Verification c) Quality Assurance d) Quality Control


14) Variance from product specifications is called? a) Report b) Requirement c) Defect


15) Verification is
a) Process based b) Product based


16) White box testing is not called as___________
a) Glass box testing b) Closed box testing c) Open box testing d) Clear box testing


17) Name the events that will be analyzed, Count the named incidents, Rank the count by frequency using a bar chart & Validate reasonableness of the analysis is called as a) Pareto Analysis b) Cause and Effect Diagram c) SWOT Analysis d) Pie Charts


18) Retesting of a single program or component after a change has been made? a) Full Regression Testing b) Unit Regression c) Regional Regression d) Retesting


19) Requirement and Analysis, Design, Development or Coding, Testing and Maintenance is called as Software Development Life Cycle (SDLC ) a) True b) False


20) The testing which is done by going thro’ the code is known as,
a) Unit Testing b) Blackbox testing c) White box Testing d) Regression testing


21) Configuration Management Plan describes the Configuration Management procedures and structures to be used. a) True b) False


22)This type of testing method attempts to find incorrect or missing functions, errors in data structures or external database access, interface errors, Performance errors and initialization and Termination errors. It is called as a) White Box Testing b) Grey Box Testing c) Black Box Testing d) Open Box Testing


23) Phase Definition. It will come under a) CMM Level 1 b) CMM Level 2 c) None


24) Software testing which is done without planning and Documentation is known as
a) adHoc Testing b) Unit Testing c) Regression testing d) Functional testing.


25) Acceptance testing is known as
a) Beta Testing b) Greybox testing c) Test Automation d) White box testing


26) Retesting the entire application after a change has been made called as? a) Full Regression Testing b) Unit Regression c) Regional Regression d) Retesting


27) Boundary value analysis belongs to which testing method?
a) Black Box testing b) White Box testing


28) It measures the quality of a product
It is a specific part of the QA procedure, It is a corrective process,
It applies for particular product & Deals with the product. a) Validation b) Verification c) Quality Assurance d) Quality Control


29) What are the Types of Integration Testing? a) Big Bang Testing b) Bottom Up Testing c) Top Down Testing d) All the above


30) Product Risk affects The quality or performance of the software. a) True b) False


31) A metric used to measure the characteristic of documentation and code called as a) Process metric b) Product Metric c) Test metrics


32) Which is non-functional software testing?
a) Unit Testing b) Block box testing c) Performance Testing d) Regression


33) The process that deals with the technical and management issues of software development called as? a) Delivery Process b) Testing Process c) Software Process


34) Executing the same test case on a modified build called as a) Regression Testing b) Retesting c) Ad hoc Testing d) Sanity Testing


35) Which is Black-Box Testing method?
a) equivalence partitioning b) code coverage c) fault injection


36) Business Risk affects The Organization developing or Procuring the software. a) True b) False


37) Stratification is a Technique used to analyze/divide a universe of data into homogeneous groups (strata). a) True b) False


38) Automation Testing should be done before starting Manual testing.

Is the above statement correct?
a) Yes b) No


39) Earlier a defect is found the cheaper it is to fix it.

Is the above statement correct? a) Yes b) No


40) Informing to the developer which bug to be fix first is called as a) Severity b) Priority c) Fix ability d) Traceability


41) Software Testing is a process of evaluating a system by manual or automatic means and verify that it satisfies specified requirements or identity differences between expected and actual results. a) True b) False


42) Retesting modules connected to the program or component after a change has been made? a) Full Regression Testing b) Unit Regression c) Regional Regression d) Retesting.


43) An Important metric is the number of defects found in internal testing compared to the defects found in customer tests, Status of test activities against the plan, Test coverage achieved so far, comes under a) Process Metric b) Product Metric c) Test Metric


44) Alpha testing will be done at,
a) User’s site b) Developers’ site


45) SPICE Means a) Software Process Improvement and Capability Determination b) Software Process Improvement and Compatibility Determination. c) Software Process Invention and Compatibility Determination. d) Software Process Improvement and Control Determination


46) Requirements Specification, Planning, Test case Design, Execution,
Bug Reporting & Maintenance This Life Cycle comes Under a) SDLC b) STLC c) SQLC d) BLC


47) It provides a set of levels and an assessment model, and presents a set of recommended practices that allow organizations to improve their testing processes. a) TIM (Testing Improving Model) b) TMM (Testing Maturity Model) c) TQM(Total Quality Management)


48) Standards and procedures for managing changes in an evolving software product is called? a) Confirmation Management b) Confederation Mangement c) Configuration Management d) Compartability Management


49) Path Tested = Number of Path Tested / Total Number of Paths a) True b) False


50) This Testing Technique examines the basic program structure and it derives the test data from the program logic; Ensuring that all statements and conditions executed at least once. It is called as a) Block box Testing b) White box Testing c) Grey Box Testing d) Closed Box Testing


51) This type of test include, how well the user will be able to understand and interact with the system? a) Usability Testing b) User Acceptance Testing c) Alpha Testing d) Beta Testing.


52) Defects generally fall into the following categories? a) WRONG b) MISSING c) EXTRA d) All the above


53) What is correct Software Process Cycle? a) Plan(P)——>Check(C)——>Act(A)—–>Do(D) b) Plan(P)——>Do(D)——>Check(C)—–>Act(A) c) Plan(P)——>Do(D)——>Act(A)—–>Check(C)


54) Conducted to validate that the application, database, and network they may be running on can handle projected volumes of users and data effectively. The test is conducted jointly by developers, testers, DBA’s and network associates after the system Testing called as a) Functional Testing b) Stress/Load Testing c) Recovery Testing d) Integration Testing


55) Maintenance Plan predicts the maintenance requirements of the system, maintenance costs and effort required a) True b) False


56) Beta testing will be done by
a) Developer b) User c) Tester


57) Validation plan describes the approach, resources and schedule used for system validation a) True b) False


58) Integration, It will come under a) CMM Level 1 b) CMM Level 3 c) CMM Level 2 d) None


59) Types of quality tools are Problem Identification Tools and Problem Analysis Tools. a) True b) False


60) Which Software Development Life cycle model will require to start Testing Activities when starting development activities itself
a) Water falls model b) Spiral Model c) V-model d) Linear model


61) A metric used to measure the characteristic of the methods, Techniques and tools employed in developing, implementing and maintaining the software system called as a) Process metric b) Product Metric c) Test metrics


62) Check Sheet(Checklist) is considered a simple , but powerful statistical tool because it differentiates between two extremes. a) True b) False


63) Application should be stable. Clear Design and Flow of the application is needed for Automation testing. a) False b) True


64) Quality plan describes the quality procedures and standards that will be used in a project. a) False b) True


65) How severely the bug is effecting the application is called as a) Severity b) Priority c) Fix ability d) Traceability


66) Project Risk affects The Schedule or Resources. a) True b) False


67) The name of the testing which is done to make sure the existing features are not affected by new changes
a) Recursive testing b) Whitebox testing c) Unit testing d) Regression testing


68) Management and Measurement, It will come under a) CMM Level 1 b) CMM Level 3 c) CMM Level 4 d) CMM Level 2


69) AdHoc testing is a part of
a) Unit Testing b) Regression Tesing c) Exploratory Testing d) Performance Testing


70) Cost of Production = Right The First time cost(RTF) + Cost of Quality. a) True b) False


71) ————- means under what test environment(Hardware, software set up) the application will run smoothly a) Test Bed b) Checkpoint c) Code Walk through d) Checklist


72) TQM represents
a) Tool Quality Management b) Test Quality Manager c) Total Quality Management d) Total Quality Manager


73) Optimization, Defect Prevention, and Quality Control. Its come under the a) CMM Level 2 b) CMM Level 3 c) CMM Level 4 d) CMM Level5


74) Unit Testing will be done by
a) Testers b) End Users c) Customer d) Developers


75) Beta testing will be done at
a) User place b) Developers place


76) A Plan to overcome the risk called as a) Migration Plan b) Master plan c) Maintenance plan d) Mitigation Plan


77) Splitting project into tasks and estimate time and resources required to complete each task called as Project Scheduling a) True b) False


Answers


(1) d (2) b (3) a (4) b (5) a (6) a (7) b (8) a (9) b (10) d (11) a (12) b (13) c (14) c (15) a (16) b (17) a (18) b (19) a (20) c (21) a (22) c (23) b (24) a (25) a (26) a (27) a (28) d (29) d (30) a (31) b (32) c (33) c (34) a (35) a (36) a (37) a (38) b (39) a (40) b (41) a (42) c (43) c (44) b (45) a (46) b (47) a (48) c (49) a (50) b (51) a (52) d (53) b (54) b (55) a (56) b (57) a (58) b (59) a (60) c (61) a (62) a (63) b (64) b (65) a (66) a (67) d (68) c (69) c (70) a (71) a (72) c (73) d (74) d (75) a (76) d (77) a

The need for having development/programming knowledge for Software Testers

In this Chapter, I am going to write about the need for having basic development knowledge for Software Testers.
I have worked as both Programmer and Software Tester. So, I think I will be the appropriate person for writing this Chapter.

When I worked as Programmer/developer, I used to see many Software Testers who used to create poor test strategy due to their poor programming knowledge.
And, it may be difficult to set up proper test environment without having proper programming knowledge.

Assume that a Software Tester is going to test a Web application. If something goes wrong while doing his testing, he should be able to report the issue clearly by mentioning whether the error is happening from client (i-e browser) side, network connection or server side. It will help the developers to fix the issues quickly.

For doing this narrow down, the Testers should know what is Client (webbrowser), how the server works and how internet is working.

He should know how to see the client side error messages displayed by various browsers.
Reproducing the issue also need some kind of development knowledge.

Being familiar with SQL and handling databases will help to test back end part of the web application. It will help to load some prerequisite data also to save testing time.

Test data collection task can be done easily if the Testers know little bit programming.

The recent Agile development model is trying to reduce the gap between Software Development and Software Testing.

So, I believe everyone will agree that it is very important to have programming knowledge if you are going to be a Software Tester.
Now, we can see how we can give basic programming knowledge to the Software Testers.

– Development Team can arrange session for giving overview about the development for the Software Testers.
– Software testers can start reading very basics of programming and web development from w3schools.com
– Testers can participate in code review meetings.

Ok. This Chapter has explained the importance of having programming knowledge for the Software Testers. Similarly, it is important to have Software Testing knowledge for the programmers.

 And, if your company is going to implement Test driven development, then it is important to have close interaction with the Development Team. This interaction will be effective only if the Software Testers are having some fundamental programming knowledge.

Software Test Automation tool evaluation

In this chapter I will explain about evaluating Automation test tool and selecting appropriate tool suitable for our requirements.
Before start evaluating tool we should analyze whether automating software testing will really give any benefit over manual testing for your needs.
Actually, Software Test Automation is a good way to cut down time and cost.
But, it will reduce the cost and time only when it is really necessary or it is used effectively.

Test Automation is not required if you are going to use your application one time only or for short period only. For example, assume that you are having a website developed in ASP, and you are making some changes in this website. And, assume you are having solid plan for converting/migrating this ASP site into either ASP.NET or PHP in near future.

In this situation, it is not advisable to automate the testing of the new changes done in the ASP site.
In this case, simply you can complete the testing manually and then you can start your automation testing preparation once after the migration is done.

So, basically we need to automate our testing procedure when we have lot of regression work.Once after taking decision to do the test automation, the next step is selecting appropriate automation tool.

There are hundreds of tools available for automating the software testing and some of them are Free.
Test complete, SilkTest, SilkPerformer, QARun, QALoad, TestPartner, WinRunner, LoadRunner, QTP, Rational Robot,Selenium,WATIR and openSTA are some of them.

Some of these Tools (e.g Selenium) are open-sourced.We need to select appropriate tool based on below factors.

Budget allocated for the Testing process – Price for each automation tool will vary. Some of them are costly, and some of them are even free.License pattern will be varying for each tool. License cost of some tools will vary according to geography location also. And, some tool vendors will fix different price for seat license and floating license.

So, first we need to decide about our licensing needs. i-e Ask below questions,
– In case the tool price changes according to geographic location, whether it will be cost effective for your location.
– How many Automation Test engineers will simultaneously work in your automation project?
– Whether you need separate set up for developing the scripts and for executing the scripts?
– Whether you are having plan to automate your any other testing activities? Whether the selected tool can be used for other projects also?

Support available for the Automation Tool. We need to evaluate whether the Tool provider will provide enough support and bug fix releases. And, we need to think about the support provided by the Forum community also.

Analyze whether the execution speed of the automation tool matches with your requirements.

Check the installation requirements (both Software and Hardware) for installing the automation tool in your test script development environment.

List down current skill set of your testers and check whether the tool can be effectively used by your testers. For example QTP will support vbscript, if your testers know vbscript they can easily learn using QTP.

Feasibility study is very important before finalizing the Tool. Most of Tools will provide evaluation or Trail offer. For example QTP can be downloaded from HP site and we can use it for 14 days. During this trial period try to automate different portions of your application to make sure that the Tool can be used for automating your Testing needs.

Analyze the Market Share and financial Stability of the vendor of the tool. It will get significance if you are going to use the Automation tool for long term regression testing purpose.

Check whether the Tool can be easily integrated with bug tracking tools. For example, QTP will be closely integrated with Quality Center (Test Director) which is a Test Management Tool.

The best approach is, we can prepare a list with all these factors and add remarks for each tool. And, we can select the tool by analyzing this list.

Wish list for the QTP future release.

We can not say that QTP is a complete Tool even when it has crossed lot of releases.  This is due to the fact that Test automation tools are complex to develop.

So, members of a Testing group had a discussion about things that need to be done in coming releases of QTP. I have mentioned below requirement in this discussion.

Allow QTP Script execution while minimizing it so that we need not have separate machine for test script execution.

Find below the requirements collected from others during this discussion. Most of the people want to have the ability for opening multiple tests at a time.

  • Provide better support for Ajax
  • Provide better support for remote test execution from Quality Center
  • A way to inherit test/action resources.
  • Better browser support. Support for non-IE browsers such as Chrome and Safari
  • Need easy license management
  • A better coding/IDE environment with better intellisense, code folding, better debugging (ability to see object contents)..
  • Better version control. Being able to check out previous versions of a test.
  • Shared code libraries in QC. i-e ability to save in a common library share that all projects could use.
  • Use an object orientated scripting language instead of or in addition to VB script
  • Embed the object spy in the browser similar to firebug for firefox
  • Ability to replace object repository with other repositories such as MySql Database
  • Reduce the cost. Selenium is evolving and is eating up market share because its free
  • Scripts should be able to run on a locked computer.
  • Add ability to right click on web browser object to spy on it
  • Ability to open more than 1 script at a time
  • User should be able to attach encoded functional library (I.e. .vbe extension file).
  • Ability to “pause” a run in order to edit a script during execution of multiple iterations
  • Support for FLASH/FLEX Applications.
  • Expose runtime engine as an API so we can start using languages other than VBScript.
  • Simple and cleaner uninstall process
  • Improved support for distributed parallel scalable execution (cloud/VM) with reporting concatenation.
  • Enhanced function libraries especially database operations
  • More descriptive error messages rather than “Generic Error” message.
  • User should be allowed to Export selected portions of Reports
  • Ability to see the partial report when the script execution continues

QTP trial version installation

Learning QTP (Quick Test professional) will become easy if we practice some simple tutorials with QTP.

HP is providing free trail offer for Quick Test Professional.

Follow below steps to have a QTP set up.

First do keyword search for “quick test professional” in HP website

You can see the download link under “trail versions” in the search result.

Once after downloading it you can easily install it just by clicking the setup icon. You will need maintenance number while doing installation. You can contact the HP to provide Maintenance number for you.

This Trail version will be valid for 14 days which is enough to learn QTP

QTP Interview Questions and Answers

This Chapter will be useful if you are in a position to start any Software Testing automation project.

In this Chapter I am going to write about selecting appropriate candidate for your Team if you are going to Automate your testing activities using a tool QTP (Quick Test Professional)

First, we can start with short listing resumes of suitable candidates.

Basically QTP is just a Tool. Your Team members can be trained in this Tool easily if they meet some prerequisites (e.g knowledge about Software Testing Concepts and programming fundamental knowledge).

So, it is not necessary to short list the candidates with prior work experience with QTP unless you want a Team member who needs to start work on QTP script creation from day one of joining your Team.

But, give priority to the knowledge and/or work experience in any kind of Software Testing.i-e Having hands-on with manual testing is a big plus for the Automation tester.

And, you can choose the profiles with knowledge/experience in some other automation test tool also. It will help them learn QTP quickly.Candidates with vbscript knowledge/experience can learn QTP fast.

Vbscript is used in ASP (Active server pages). So, you can consider ASP developers also for your QTP automation Team.

If you are going to create your Automation Team from scratch, at least you should have one resource (Assume “Team Lead”) with good experience in QTP. His experience should include creating appropriate automation framework and should be expert in handling any object recognition issues.

If you are not having such a person to handle any object recognition related issue, it will be difficult to complete the project even if you have good team members to create scripts.

Now, we can discuss about selecting your “Team Lead” and other members.
First we will start with doing interview for your “Team Lead” position in the QTP automation project. (I mean to say the project which involves automating the functional and regression testing activities using the QTP tool)

Ask the candidate about handling Object repository.

Ask him to explain any QTP object recognition related challenges he faced during his previous projects. And, ask him to explain how he had solved those issues.(Anyone who worked in any QTP automation project should have faced such an issue)

Ask the candidate to explain about his understanding about Automation Framework.

Ask him how he will deliver the QTP script to production environment from the development environment. In other words, try to get details about his understanding about AOM (Automation Object Model).

Ask him to explain about his understanding about COM objects and ask him whether he has handled any COM based application ( e.g xcel, internet explorer, fso,etc) from QTP script.

Ask him about his approach to split any task to be given to the Team members. His answers should reflect his understanding about proper use of Shared object repository.

Ask few questions which can help to reveal his understanding and approach of Configuration management in QTP script development environment.

You may ask few questions which can test his thinking about script maintenance.

Apart from QTP knowledge, you can ask some questions for knowing about his basic knowledge in other test automation tools. It will be required for tool evaluation to start any new project. And, it will be useful when doing any migration project.
For example, having some basic knowledge in winrunner will be helpful if you are going to convert winrunner scripts into QTP scripts.

Ask him to explain about integrating the QC (Quality Center) with QTP.

Test his knowledge about Database connection with QTP. At least he should be familiar with ADODB, connection string and recordsets. And, he should be familiar with basic SQL queries also.

In case of interviewing Team member, just check his knowledge in Software Testing concepts and knowledge in any programming knowledge. You can ask him about SDLC.
Ask him to explain about various checkpoints, data driven testing, expert view/keyword view, regular expression and recovery scenario in case he had learnt QTP previously.

Find below the collection of common interview questions related to QTP.It will be useful for the people who are searching job as Automation test engineer.

Explain about Object Repository in QTP?
Object Repository is the centralized place for storing the Properties of objects available in AUT (Application Under Test). Click here for the detailed Answer.

What are the two different Types of Object Repositories available in QTP?
Local Object Repository and Shared Object Repository. More details…

What Descriptive Programming and what are the advantages of using Descriptive programming in QTP?
Instead of using Object Repository for storing properties of Test objects, we can straight-away define the properties while writing the script itself using DP. Using Descriptive programming we can start work on writing QTP scripts even before the application under Test is NOT available. More details…

What are the disadvantages of Descriptive Programming in QTP?
The main disadvantage of Descriptive programming is Maintenance issue. More details…

What is framework in QTP?
Framework is nothing but a way or approach of designing the automation scripts. QTP uses various frameworks such as Key Word Driven Testing and Data-driven Testing.
More details…

How will you get evaluation version of QTP?
We can get 14 days trial version of QTP from HP site. More details…

What are the various settings/options available in QTP? And, explain the purpose/scope of them?
Some setting in QTP are specific to Tests and some setting are specific to the IDE. More Details…

How will you set the QTP script to start run at specified time?
We can use AOM (Automation Object Model) for creating the vbscript which can be put in windows scheduler for running the QTP script at specified time. More details…

Tell the difference between Action Iteration and Test Iteration in QTP?
Action iterations will be nested within the Test iteration. Action iteration will use the data from local data sheet and the Test Iteration will use the data from Global sheet of the data table. More details…

How will you automate the testing of .NET application which uses thrid-party UI component such as Infragistic netAdvantage?
We should extend capability of .net add-in by using TestAdvantage More details…

How to handle Passwords in QTP Scripts?
We can encrypt the password using password encoder utility provided by QTP. SetSecure method can handle this encodeded password. More details…

What are the steps/processes involved in QTP automation?
Creating scripts, enhancing scripts, debugging, run script, analyze the results and report the defects. More details…

List some best practices need to be followed while doing QTP automation?
We need to use Shared Object repositories and need to use synchronization point wherever it is required. More details…

What is Object Spy in QTP? And, how to use it?
Object Spy is used for seeing properties and methods of any object in an open application. We can see the properties just by pointing the mouse pointer on the object once after clicking the hand symbol button in the Object Spy Dialog. More details…

How to use Object Spy if the required object is not visible (i-e window of the the object is not active)?
Maximize the window or bring it into the top active window while holding Ctl key after clicking the hand symbol button pointer in the Object Spy dialog box. Once the object is visible, release the Ctl key to use the object spy functionality.

How will you read the Test Object property using scripting?
We can use the “GetTOProperty” method.

What is the use of GetTOProperties method?
This method will be used for getting all the properties and their values of a Test Object.

Which QTP method can be used to get the value of an object property during runtime?
GetROProperty

Will SetTOProperty method make any change in the Object Repository?
No, it won’t make any change in the Object Repository. It will just affect the way QTP identifies the object during runtime.

Is it possible to read all the RO properties of a Object?
QTP is not having any built-in method for reading all the RP properties of an Object. But we can write simple script for reading all the properties from windows registry and then get the value of each property using the GetROproperty method. More details…

Why we need to automate the software testing using the tools such as QTP?
Automation will avoid human related errors and it can improve the test execution speed also.More details…

Is it possible to automate all the test cases?
No, it is not possible to automate all the test cases. We need to pick the test cases that can be automated.

Tell me about your understanding about QTP?
QTP is a functional and regression test automation tool. It uses vbscript. It can be easily integrated with Quality Center as both are HP products. It supports data driven testing and keyword driven testing. The add-in concept supports various applications such as web, vb, activex, java, TE, and dotNet. More details…

Explain QTP Testing process?
QTP Testing involves Creating your test plan, Recording a session on your application ,Enhancing your test,Debugging your test ,Running your test on a new version of your application, Analyzing the test results and Reporting defects.Read more details…

Tips for doing effective QTP script Development

  1. Read the Requirements completely and repeatedly till understanding it clearly without any ambiguity. It is better to create own automation testcase/requirement based on the manual test cases or business requirement document.
  2. Highlight or make note of key requirements in the requirement document. And, highlight the points that are difficult to understand.
  3. Don’t hesitate to approach the developer/customer/client if you need any clarification in the requirement and also don’t hesitate to inform if any of the requirements is unrealistic. Prepare a list of requirements or test cases which can not be automated.
  4. QTP Script development Team also should participate in the requirement analysis before starting any application development activity. QTP team can give suggestions (e.g giving unique name/id for each window so that object identification problem can be avoided when creating QTP scripts) for the application development Team for improving effectiveness of the QTP script development.
  5. Start working on coding/scripting part only after getting clear understanding of the overall Design of the system
  6. Enforce Review and Walk Through Activities.
  7. Try to setup Development Environment similar to production environment. Otherwise you will face lot of difficulties while running the QTP script against the production application once after completing your script development using development/testing application.
  1. Do unit testing immediately after developing each small functionality.
  2. Give updates of the progress to the client/customer frequently. If you are facing any difficulty/issue remember to specify in the updates.
  3. Make list of things that will vary from Development Environment and Production environment
  4. Prepare a user guide document and deliver it along with code.

 

QTP methods and script for reading object properties

In the previous Chapter, I had written about Object Spy.

For using Object Spy, we need to point the Object Spy pointer on the Object.
i-e We can read the properties manually only. And it can be done in the design time only.
In this post, I am going to write about reading the properties of any Object in the application using scripting (i-e programmatically in run-time)

QTP is having below methods.

GetTOProperty– This method returns the value of the property from the test object’s description, i.e., the value used by QTP to identify the object. In other words the list of properties stored the Object Repository. If the property is not part of the test object’s description, a warning will be issued by QTP.

GetTOProperties – This method is similar to GetTOProperty, but it will list all/collection of properties and their values.

It can be used as below to get all the Test Object properties and their values in “Submit” button of “Login” window in a vb application.

Set theTestObject = VbWindow(“Login”).VbButton(“Submit”)

Set Props = theTestObject.GetTOProperties

PropsCount = Props.Count

For i = 0 To PropsCount – 1

PropName = Props(i).Name

PropValue = Props(i).Value

MsgBox PropName & ” = ” & PropValue

Next

Set theTestObject = VbWindow(“Login”).VbButton(“Submit”)
Set Props = theTestObject.GetTOProperties
PropsCount = Props.Count
For i = 0 To PropsCount – 1
PropName = Props(i).Name
PropValue = Props(i).Value
MsgBox PropName & ” = ” & PropValue
Next

GetROProperty – It will be used to get the value of an object property during runtime, such as the current list/combo item selection, page title, or the text in a WebEdit, or the size (width & height) of an object.

SetTOProperty changes the value of a test object property. Changing the property won’t make any change in the Object Repository, but it will just affect the way QTP identifies the object during runtime. Actually, this changes the properties of the temporary copy of the object stored in RAM by QTP.

i-e QTP is having the methods GetTOProperty,GetTOProperties and SetTOProperty for handing Test Objects.

And, it is having SetTOProperty method for handing Run-time object.
Obviously it can not have method SetROproperty, because QTP script should not change the actual objects (But still we can do it using “Object”. I will write a separate post about it later)

But it can have a method something like getROproperties. As of now, QTP is not having such a method.

So, we can read all RO properties from windows registry.
For example, below piece of code can read the name of properties for “Page” object from the registry.

Const HKEY_LOCAL_MACHINE = &H80000002

Set oReg = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv”)

SKeyPath = “SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\page\Properties”

oReg.EnumValues HKEY_LOCAL_MACHINE, sKeyPath, arrNames

sNames = “List of Properties:” & vbNewLine

For i = 0 to UBound(arrNames)

sNames = sNames & arrNames(i) & vbNewLine

Next

Const HKEY_LOCAL_MACHINE = &H80000002
Set oReg = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv”)
sKeyPath = “SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\page\Properties”
oReg.EnumValues HKEY_LOCAL_MACHINE, sKeyPath, arrNames
sNames = “List of Properties:” & vbNewLine
For i = 0 to UBound(arrNames)
sNames = sNames & arrNames(i) & vbNewLine
Next

After reading the properties, the script can read each property name from the array “arrNames” and get the run-time object value using GetROproperty method.You can refer below piece of code.

Set TestPage = Browser(“Google”).Page(“qualitypoint”)

For i = 0 to UBound(arrNames)

sNamesRO = sNamesRO & arrNames(i) & “: ” & TestPage.GetROProperty(arrNames(i)) & vbNewLine

Next

MsgBox sNamesRO

Object Spy in QTP

QTP is having a Tool called as “Object Spy” for viewing the properties and methods of any object in an open application.

We can use the Object Spy pointer (a button with hand symbol) to point to an object in the application.

 

 

Object Spy Dialog window is having Two Tabs. One is “Properties Tab” and another is “Methods Tab“.

Each tab is having radio button to choose one of two options “Run-Time Object” and “Test Object”.

The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy Dialog box.

The Object Spy enables you to view both the run-time object methods and the test object methods associated with an object in the Methods tab of the Object Spy dialog box.

And, we can to view the syntax for a selected method.

We can bring the “Object Spy” by clicking the Tools->Object Spy… menu or by clicking a toolbar button (an icon showing a person with hat). This icon can be accessed from Object Repository window also.

To see the properties of an object, first click on the button showing hand symbol in the Object spy Dialog.

The mouse pointer now changes in to a hand symbol and we have to point out the object to spy the details about the object.

If the required object is not visible, or window is minimized then hold the Ctrl Key and activate the required window to bring the required window to the front.

Then release the Ctrl button to make the cursor again hands symbol so that you can point the required object.

You can watch the below Video explaining Object Spy.