HP QuickTest Professional (QTP) and Selenium Comparison
This article provides a comparison between HP QuickTest Professional (QTP) and Selenium. They are popular test automation tools that are used for functional and regression testing. The purpose of this comparison is not to say which is better tool, but it consists of comparison of tool based on different criteria like supported O/S, browser, object spy, object repository, license cost etc. This article is targeted for readers having prior working knowledge of automation approach and at least one automation tool.
Author: Abhay Bharti, http://automation.lifegoeasy.com/
Let’s start with a short presentation of between HP QuickTest Professional (QTP) and Selenium.
HP QuickTest Professional is a graphical user tool and provides solution for functional test and regression test automation. This next-generation automated testing solution deploys the concept of keyword-driven testing to enhance test creation and maintenance. QuickTest Professional meets the needs of both technical and non-technical users. It works hand-in-hand with HP Business Process Testing to bring non-technical subject matter experts into the quality process in a meaningful way. Plus, it empowers the entire testing team to create sophisticated test suites. QTP users don’t enjoy a freedom of scripting language like their counterparts using Selenium. It supports only VB Script.
QTP supports the following environments
* Active X
* People Soft
* Power Builder
* Terminal Emulator
* Visual Basic
* Visual Age
* Web Services
Selenium is a family of tools, comprised of multiple software components, used only for automating web based application. These components are:
Selenium 2 or Selenium WebDriver – It is the result of the merger between Selenium and WebDriver. It supports the WebDriver API, along with the Selenium 1 technology. WebDriver is a tool for writing automated tests of web based applications. It aims to emulate the behavior of a real user, and as such interacts with the HTML of the application. It provides object oriented support and WebDriver API. This is latest/ newest addition in Selenium family.
* A server which automatically launches and kills browsers, and acts as an HTTP proxy for web requests from them.
* Client libraries for your favorite computer language.
It is suitable for testing complex AJAX-based web user. It is also an ideal solution for users of Selenium IDE who want to write tests in a more expressive programming language than the Selenese HTML table format.
Selenium IDE – Selenium IDE (Integrated Development Environment) is a rapid prototyping tool for building test scripts. It is a Firefox plugin and provides an easy-to-use interface for developing automated tests. Selenium IDE has a recording feature, which records user actions as they are performed and then exports them as a reusable script in one of many programming languages that can be later executed.
It is not designed to run your tests nor is it designed to build all the automated tests you will need. It doesn’t provide iteration or conditional statements. It is recommended to use Selenium 2 or Selenium RC for scalable and robust test automation.
Selenium IDE screnshot. Source: http://docs.seleniumhq.org/projects/ide/
Selenium-Grid – Selenium-Grid facilitates to run test suites in multiple environments simultaneously. It allows executing tests in parallel, which means that the same or different tests can be run at the same time on different remote machines. It benefits in following ways:
* If you have a large test suite, or a slow-running test suite, you can boost its performance substantially by using Selenium Grid to divide your test suite to run different tests at the same time using different machines.
* If your requirement is to run test suite on multiple environments, you can have different remote machines supporting and running your tests in them at the same time.
QTP is a proprietary, licensed software and comes in following types of license –
* Seat License: It is a machine locked license. This license can be used only for a machine it was generated.
* Floating License: It can be used on any machine that has network access to the floating license server. At any point in time the machines using the QTP license cannot exceed maximum license count on the server.
Selenium is an open source tool that doesn’t cost anything. Anybody can download selenium library, plug-in and start using it. There is no limitation on number of license use and usage time.
QTP Object Spy helps to view properties and supported method of an object in an open application. Selenium IDE object locator allows to view objects properties and method. Apart from this, a user can use add-in Firebug with Firefox and Chrome built in development tool bar to view object properties and test element locator.
QTP has built-in editor to debug code. Selenium does not have a built-in code debugger. It provides plug-in with editors like Intellij, Eclipse, Visual Studio. User needs to learn these editors to perform code debug.
QTP provides recovery scenario to handle exception during script execution. Selenium does not provide recovery scenario. The user needs to write custom function to handle run-time exception.
QTP generates nice test reports (html, XML, pdf etc) using built-in reporter object. Selenium does not have built-in reporting feature. It is dependent on framework like TestNG, Junit, SauceLab, Testing bot for test reporting.
Integration with Test Management Tool
QTP comes bundled with test management and source code control tool Quality Center. Selenium offers no test management tool. There are few options like xStudio, but user needs to explore.
QTP provides screenshot feature to take picture during the test execution of exception and error. There is no screenshot feature in Selenium.
It is quite easy to find engineers having expertise on QTP. Selenium resources are scarcer.
Ease of Use
QTP is very user friendly can be used by less code-savvy people, online help is easily available. Selenium requires good coders to write and maintain the tests.
QTP provides full support for IE and limited feature support for Firefox and Chrome that requires installing a patch. Selenium supports the following browsers:
* Firefox 2 to 17
* IE 7,8,9
* Safari 2,3,4
* Opera 8,9,10
* Google Chrome
QTP supports only the Windows platform. Selenium supports Windows, Linux and Mac.
About the Author
Abhay Bharti is a tech blogger and Test Automation Lead. He has 7+ years of working experience in QA domain. He has worked on various test automation projects, using technologies such as VBScript, Excel, HP QTP, Selenium, Java, Eclipse. He is continuously researching to find better ways of working with QTP, simplifying automation maintenance and creating test suites/frameworks.