The Potential Differences Between HP QTP & Selenium
The IT sector is aware of the emergence of QuickTest Professional (QTP) & Selenium as the popular choice of testers & programmers for their test automation effort.
First of all let us have a quick overview of both the software testing tools, before going into a broad comparison among the functionality of the two.
1) Quick Overview – HP QTP:
QTPis automated testing tool meant for performing functional and regression testing of various software applications and environments through a user interface like native GUI or web interface. It uses VBScript as the scripting language for specifying a test procedure, & for manipulating the objects & controls of the AUT. It supports a keyword and a powerful graphical user interface.
2) Quick Overview – Selenium:
Selenium is an open source software-testing tool that had been developed by Jason Huggins & his team This is released under the Apache 2.0 license and can be downloaded and used without any charge. It provides a record / playback function for authoring the tests meant for web applications. It offers a test domain specific language (DSL) to write tests in many popular languages like C#, Java, Groovy, Perl, PHP, Python and Ruby etc. Selenium works on Windows, Linux, and Macintosh platforms. Many additional projects have emerged out of the parent Selenium like Selenium Grid Selenium IDE & Selenium Remote Control having different abilities that provide a boost to the parent Selenium.
Now let us make a broad comparison among the two tools
| Sr. | What HP QTP has | What Selenium has |
| 1 | QTP is ideally suited for browser based testing | Selenium too can very well do browser based testing |
| 2 | QTP is licensed software & requires license costs that are quite a bit. | Selenium is an open source tool that doesn’t cost anything |
| 3 | QTP is quite easy to use. It is quite easy to edit the script, parameterize, navigate, playback & validate the results. | For using Selenium one needs to have programming skills. |
| 4 | QTP is quite easy to learn in a short time. | Selenium needs quite a bit of expertise compared to QTP. |
| 5 | QTP offers great benefit of the support for Business Process Testing. | Selenium users don’t enjoy such benefits |
| 6 | QTP comes powered with several add-ins by which user can comfortably work with Web, Windows, Java, dotNet applications simultaneously. | Selenium users don’t enjoy such facility. |
| 7 | QTP seamlessly integrates with QC and has excellent ability to automate non-web applications. | Selenium is an excellent tool for purely web-based applications, especially when you don’t need QC. |
| 8 | QTP works very well with database applications better than Selenium. | With Selenium one needs to exert hard to do the same job. |
| 9 | It is difficult to deploy smoke tests for web applications using QTP especially with Windows7. | With Selenium these tasks can be easily accomplished. |
| 10 | QTP uses VBscript as the only scripting language | Selenium provides a test domain specific language (DSL) to write tests in many popular programming languages, in addition to scripting with VB script |
| 11 | QTP users find scripts written in VBscript more flexible & easy to manipulate & as such tool tends to be cost effective due to the availability of a full fledged support. | Selenium users feel that the tool tends to be expensive due to lack of support & necessity of rewriting its scripts quite often |
| 12 | Resource wise it is quite easy to find engineers having expertise on QTP | Selenium Automation Engineer are bit scarce. |
| 13 | With QTP we can easily generate most comprehensive reports due to the availability of an efficient online help | Selenium users don’t enjoy such luxury as enjoyed by QTP users |
| 14 | Using a QTP framework needs less skills & everyone from a beginner to an expert can contribute in test creation to maintenance | Skill level expected in a Selenium Automation Engineer are a bit higher compared to QTP Automation Engineer |
| 15 | QTP users don’t enjoy a freedom of scripting language & IDE like their counterparts using Selenium. | For web based applications, development with Selenium is a wonderful experience since developer gets two benefits like;1) Scripting language of own choice2) IDE of Own choice. |
| 16 | QTP is one of the best automation testing tool due to its unique features like Object Repositories, Object identification, Smart Identification etc in addition to its unmatched strength in database testing. | Selenium certainly lacks such features packed in QTP. |
Conclusion:
Our objective had not been to favor one at the cost of the second. It is a matter of convenience for the testers & programmers to select a tool that suits their requirements best.
Lastly both these tools have their own advantages & shortcomings, while it all depends upon the users who truly knows how to exploit them to their best advantage.
QTP: -
Functional Testing Tool -QTP has the feature for storing screenshot of each and every page navigated during the execution. So it can be used as a proof for completion of testing, and also we can refer the screenshots of previous executions if there is any need to refer them. Test report can be automatically written to a customized report page which will ensure accuracy of the report and also it can improve look & feel of the report
Advantages of Using QTP
§User friendliness and less effort for script creation.
§Meets the needs of both technical and non-technical users.
§Advanced solution for functional test and regression test automation.
§Automation scripts are executed within specific interval of time using task scheduler/crone job.
§Many inbuilt functionalities by default and easy configuration.
§Excellent Object Identification process/mechanism.
§Easily integrated with test management tools like QC.
Disadvantages of QTP
In recent economic crisis, software companies are planning for cost reduction and efficient productivity. QTP is losing its market because of the following limitations:
§Runs only in Windows environments.
§Cannot test with all browser types and versions.
§Limited to smaller organizations/ testing teams.
§High licensing and add-inns costs.
§Slow in execution when compared with open source tools.
Selenium: -There are four variants of Selenium, which can be used in isolation or in combination to create complete automation suite for your web applications.
§Selenium IDE – Recording/Creating and enhancing scripts
§Selenium Remote Control (RC)– Executing scripts
§Selenium Web Driver (API) – Cross browser testing
§Selenium Grid – Cross platform testing
Advantages of Using Selenium:-
§Simple and powerful document object model (DOM) level testing, can be used for continuous integration with agile projects.
§Has great extensibility and flexibility, along with its tight integration with the browser unmatched by available proprietary tools.
§Supports multiple browsers such as Internet Explorer, Fire fox, Safari or Opera on Windows, Mac OS X and Linux.
§Wires Object Oriented Programming languages like JAVA, .NET, Ruby, Perl, PHP, etc.
§Provides the option of using wide range of IDEs such as Eclipse, Netbeans, Visual Studio etc depending on the choice of development language.
Disadvantages of Selenium: -
§Supports only browser based application, not the windows application
§Does not support file uploads from local machine
§Provides only partial support for dialog boxes
§Being an open source, Selenium has no official technical support
Comparison between Selenium and QTP is as follows:-
FEATURES
|
SELENIUM
|
QTP
|
Cost
|
Open source & Portable
|
Licensed and very expensive; Ten user license costs approx. 60L
|
Application support
|
Web Applications only
|
Client server applications only (like built in TCL/TK and PowerBuilder)
|
Support for web browsers
|
Supports IE, Firefox, Safari and Opera
|
Supports IE & Firefox only
|
Object Oriented Language support & Scalability
|
Supports Java, .Net, Perl, PHP, Python, and Ruby
|
Supports VB script only
|
Support for operating system/platforms
|
Supports Windows PC/MAC/UNIX Platforms
|
Supports Windows Platform only
|
Support for Test management tool integration
|
Not available. Need to track separately
|
TD/QC will be easily integrated
|
Test Development Environment
|
We can use wide range of IDEs like Eclipse, Netbeans, Visual Studio etc
|
Need Separate environment
|
UI object management & Storage
|
Managed using UI-Element user extension and properties A set of dynamically loaded libraries that is stored in the Java archive file.
|
Built-in object repository and easy handling
|
Support for Dialog Boxes
|
Supports partially
|
Supports all kinds of dialog boxes
|
Support for File upload (system)
|
Not available
|
Supports all kinds of File upload
|
Conclusion:-
· Using Selenium as the Functional Test Automation Tool, you can reduce the cost incurred for licensing using QTP.
· The efforts involved in scripting for Selenium increased by about 15 % than QTP in the initial stages. Once all the solutions are in place the efforts of automation using Selenium and QTP were almost the same.

