Tuesday, 5 August 2014

Comparison Between Selenium and QTP

Platform Support
-Language Support
Selenium uses Selenese, a high-level, cross platform language to write Selenium commands which is a domain specific language. There are 3 basic categories for the commands – named actions, accessors and assertions. To write tests there are a lot of programming languages like C#, Java, Perl, PHP, Python or Ruby.
QTP scripts can be written with VBScript which is a high-level language with support to everything except polymorphism and inheritance.
- Support for various application types
Selenium supports only Web applications.
QTP supports almost any kind of applications.
Selenium scores fewer points in this regard as it supports only web application. QTP supports almost all kinds of applications

- Support for various browsers
Selenium supports all versions of IE, Firefox, Safari and Opera and a few more browsers.
QTP supports IE & Firefox. But both do not provide full cross browser support.
Selenium is the clear winner in this respect
- Support for Data Driven Testing
Selenium IDE supports xml data source using user extensions.
Data Driven testing is implemented as Excel workbook that can be accessed by QTP. There are 2 types of data sheet global and local. Global sheet is a single one which can be accessed from every action in a test. There can even be a local data sheet associated with every action.
- Exception Handling
Selenium IDE does not support error handling particularly unexpected errors (as it supports only HTML language). Selenium RC will provide support for it (it supports languages with .NET, Java, Perl, Python, PHP, Ruby).
QTP provides VBScript with the help of which we can use On Error statements.
- Validations or Assertions
Selenium assertions can be used in 3 modes assert, verify and waitFor. When an “assert” fails, the test is aborted. When a “verify” (Soft Assertions) fails, the test will continue execution, logging the failure. This facility can be used with TestNg framework. The “waitFor” commands wait for some condition to become true. They will succeed immediately if the condition is already true. However, they will fail and halt the test if the condition does not become true within the current timeout period.
For QTP there are checkpoints: to verify application under test. These are of 10 types – Standard, Table, Image, Bitmap, Database, Text, Text Area, Page, Accessibility, and XML. A checkpoint is a verification point that compares the current value with the expected value. If the current and expected value match it generates a PASS status otherwise FAIL status.
- Support for Objects
Object properties are not supported by Selenium. Selenium objects can be managed by using UI element user extensions. QTP comes with in-built object repository.
QTP objects have user friendly names.
Integration with Application Lifecycle Management and going beyond
- ALM Integration
Selenium being an Open Source software can be integrated with other Open Source products for Application Lifecycle Management like QMetry. This in turn can provide platform for software development lifecycle platform in the form of Atlassian Jira (project tracking tool), FogBugz or Bugzilla (bug tracking tool).
QTP being a part of Quality Centre it supports requirement traceability matrix. QTP integrates seamlessly with QC. Test management and mapping the manual testing process with automation becomes a lot easier with this integration
QC is still not complete life cycle management tool. It does not provide support for efforts management, build management or support to different process templates. It supports only test management, bug management and requirement management.
- Going beyond
Selenium being Open Source a lot of plugins available. Selenium IDE has plug-ins for customization, for adding new functionality to API, changing existing functionality.
QTP provided plug-ins for ActiveX controls, web application and VB objects. Other than these plug-ins for other objects like Microsoft .NET, multimedia plug-ins and Windows Mobile are also available. These QTP plugins available at an additional cost.
Each of the tools keeps on adding features as per need. Selenium being open source there are a lot of plug-ins.

No comments:

Post a Comment