Sie sind auf Seite 1von 4

International Journal of Computer Systems (ISSN: 2394-1065), Volume 03 Issue 02, February, 2016

Available at http://www.ijcsonline.com/

Comparative Study of Automated Testing Tools: Selenium and Quick Test


Professional
R. Bhavithra, G. Lavanya, D. Thiruveni
Department of Information Technology,
Vivekanandha College of Engineering for Women (Autonomous),
Tamilnadu, India.

Abstract
Software testing helps in finalizing the software application or product against business and user requirements. Testers
play an important role in producing the high quality software product.It is the process of validating and verifying the
software program. Testing automation tools helps us to automate the entire process of testing in software
development.There are variety of software testing automation tools available.From which QTP supports the largest
range of technology in the industry whereas selenium is one of the few free tool on the market that appears to have
functionality that one would expect in a vendor tool. The objective of this paper is to conduct a comparative study of
automated tools which are Selenium free source and Quick test professional (QTP).
Keywords: Selenium web driver, QTP, Object repository.

I.

INTRODUCTION

Generally, while automating web application using any


automation tool, it would be an open source like selenium
web driver or commercial like UFT/QTP. It is quite
straight forward to identify locators for static elements.
But in some applications, it is quite challenge to identify
locators for dynamic elements. In this paper our
comparative study is about QTP and Selenium. Both QTP
and Selenium can handle dynamic objects but with some
restrictions and modifications.
Quick Test Professional (QTP) was originally
developed by Mercury interactive.Initially their legacy
testing solution winrunner is having some limitations.
Later Mercury team thought to develop a similar tool like
win runner with Microsoft named quick test professional
aka QTP. It is basically functional testing tool where we
can test functionality of any application under test(AUT).
It helps testing teams to automate manual test cases and
execute regression tests automatically. The main drawback
of QTP is it cannot run multiple threads. But the factor of
grid support available in selenium, where we can run
multiple instances of the application on different browsers
at the same time[5].
After that selenium was originally developed by Jason
Huggins in 2004 as an internal tool at Thought Works.
Paul Hanmant joined the team and steered the
development of the second mode of operation that would
later become selenium Remote control(RC).This tool was
open sourced that year. Selenium is a portable software
testing framework for web applications. It provides a
record playback tool for authorizing tests without learning

a test scripting language (selenese) to write a test in a


number of languages include java, c++, python and ruby.
Selenium web driver is the successor of selenium
remote control which has been deprecated. This is
implemented through a browser specific browser driver,
which sends command to a browser and retrieves
results[4].
II.

PROCESS OF HANDLING DYNAMIC OBJECTS

A.QTP:
In this paper we have to handle the dynamic objects in
QTP using the following methods
(i) GetRo:
To capture the value of a dynamic object in a web
application GetRo method is executed. In order to capture
the value of an object and that too of a dynamic object
then we will use this property which means Get Run time
object property. A sample code for gmail to count unread
emails from any account is given below.The prerequisite is
that you have to login to your gmail account and then run
this script
Inboxcount=Browser(title:Gmail.*).Page(title:
Gmail.*).Link(innertext:Inbox.*).getRoproperty(innert
ext)
If inboxcount =Inbox Then
Print No Unread Emails
Exit action
Else
//replaces inbox with space
emailcount = replace(inboxcount,Inbox,)
//removes all the spaces
emailcount= trim(emailcount)
emailcount=replace(emailcount, ),)

117 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016

R. Bhavithra et al

Comparative Study of Automated Testing Tools: Selenium and Quick Test Professional

emailcount=replace(emailcount, ),)
Print you have &emailcount& unread emails in your
inbox
End If.

and all the steps are written one after the other in a linear
fashion.
Following diagram illustrates the components and the
typical workflow of the Linear Framework in QTP.

B.SELENIUM:
(i).Absolute Xpath:
Xpath position or absolute Xpath are most frequently
used to resolve the dynamic element issues. Only problem
with using Xpath locators is that they are very fragile.
They are most prone to breakage in case of change in web
page. This factor could get worse exponentially as the test
suite size and completely increases. An example is:
web_element_name=html/body/div[30]/div[2]/div[2]
(ii).Identify element by starting text:
If the dynamic elements have a definite pattern to
them, then we can also use javascript functions like starts
with or contains in one element locators to separate the
dynamic part of locator from static part. So we can starts
with function here.
Xpath://button[starts-with(@id, Submit-)]
(iii).Identify element by containing text:
Here we can use contains function where dynamic
element is surrounded by a static value.
<input class=new-user field-001>
<input class=old-user field-002>
Xpath://input[contains(@class,suggest)]

Figure 1: Components and typical workflow of the linear


framework in QTP.
(ii).Components and Workflow of Modular Framework:
In order to use the functions from the external library
file, the library file must be first associated to the test
cases. Once this is done, the test case can call all the
functions present in the library file.

(iv).Identify element by index:


If there are multiple elements present on the page with
same locator we can use java code in our selenium web
driver script to interact with element of particular
index.driver.findElement(By.xpath(//submit).get((page
number).
(v).Identify element with reference of a closest stable
element:
We can use the DOM structure to find the closest
stable element which can be used as a reference element to
find the required element.
XPATH://span 1/../followingsibling:div//button
(vi).Identify element by stable preceding text:
For web elements like text field text area we can
identify them by using the stable text lables nearby. This
approach might not be possible in all scenarios but it does
resolve the dynamic element issues where possible.
III.

PRINCIPLES AND COMPONENTS

A. QTP
(i).Components of QTP in linear framework:
Here each test case has its own local object
repository and the data is hard-coded in the script. Linear
Framework is the framework where you write the scripts
in a step by step manner as depicted in the test case flow.
In this type of framework, we dont create any functions

Figure 2:Components and work flow of modular


framework in QTP.
Modular Framework is the approach where all the test
cases are first analyzed to find out the reusable flows.
Then while scripting, all these reusable flows are created
as functions and stored in external files and called in the
test scripts wherever required. Consider the following 2
test cases.
a) Login > Create Order > Logout.

118 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016

R. Bhavithra et al

Comparative Study of Automated Testing Tools: Selenium and Quick Test Professional

b) Login > Search Order > Logout


In order to use the functions from the external library
file, the library file must be first associated to the test
cases. Once this is done, the test case can call all the
functions present in the library file.

driver is a tool for automating web application testing, and


in particular to verify that they work as expected.
Once our project is setup, we can see that web driver
acts as just as any normal library:it is entirely selfcontained ,and we usually dont need to remember to start
any additional processes or run any installers before using
it, as opposed to the proxy server with Selenium-RC.
IV.

COMPARATIVE STUDY

Table 1: Differences between selenium and QTP[2].

SELENIUM

QTP

Open source

Paid tool

Works on all OS

Works on windows.

Tests
only
applications.
Works on
browsers.

Figure 3:Components
framework in QTP.

and

workflow

of

modular

B.SELENIUM:

almost

The components of selenium testing tools are


(i).Selenium IDE:
Selenium IDE is the integrated development
environment for building selenium test cases .It operates
as a firefox add -on.
(ii).Selenium RC:
Selenium RC is a test tool that allows us to write
automated web application. It tests in any programming
language.
(iii).Selenium Grid:
Selenium Grid is a server that allows test tool web
browser instances running on remote machines.
(iv).Selenium Web Driver:
Selenium Web Driver makes direct calls to the browser
using each browsers native support for automation. Web

Tests desktop and web


applications.

all

Works on firefox3.5.x nad


IE.

No object repository.

Has
got
repository.

Core engine is javascript.

Core engine is not a


javascript.

V.

Selenium is a portable software testing framework for


web application. It provides a record/playback tool for
authoring test without learning a test scripting language
(selenium IDE).It also provides a test domain specific
language(selenese) to write tests in a number of popular
programming languages including java, python and
ruby[3].

web

an

object

CONCLUSION

There is difference between buying a branded car and


assembling a car on your own. Branded car has its cost &
services attached whereas in assembled car, you need to
take care of everything on your own. But, there is a hybrid
solution where you can go to a custom workshop to get an
assembled car (sales and post-sales support) and pay for
their services. The same concept is now available in IT too
such as you go to a service provider who has everything.
One can select a testing tool based on the type of
application need to be tested, budget, and the efficiency
required.
Both these tools are at the same level, the
difference is that QTP is mostly suitable for the desktop
based application whereas selenium is an excellent tool for
web-based applications.
REFERENCES
[1]
[2]
[3]
[4]

[5]
[6]

Principle
and
components
of
Selenium.
http://en.wikipedia.org/wiki/principles.
QTP V/S Selenium, qtp-sel.blogspot.in/?m=1.
Seleniumwebdriver
http://www.seleniumhq.org/doc/03_webdriver.jsp
selenium
Introduction
and
its
components
http://tfortesting.wordpress.com/2012/10/25/selenium-introductionand-its-components/
QTP Introduction.www.tutorialspoint.com/qtp/qtp_overview.html.
Harpeet Kaur et al, Comparative study of automated testing tools
QTP Selenium and TC, Int. Journal of Engineering Research and

119 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016

R. Bhavithra et al

[7]

[8]

[9]
[10]

[11]
[12]
[13]
[14]

Comparative Study of Automated Testing Tools: Selenium and Quick Test Professional

Applications.ISSN:2248-9622,Vol.3,Issue 5,Sep-oct2013,pp.17391743
Innovative approaches of automated tools in software testing and
current technology as compared to manual testing Global journal of
enterprise of information system, an 2009-jan 2009.
Sneha Khoria and Pragati Up adhyay,Performance Evaluation and
Comparison of Software Testing Tools VSRD International
Journal of Computer Science Information Technology, Vol. 2 No.
10 & October 2012.
Software Test Automation - http ://en.wikipedia.org/wiki/Test
automation
Mohd. Ehmer Khan, Different Forms of Software
TestingTechniques for Finding Errors,IJCSI International Journal
of Computer Science Issues, Vol. 7, Issue 3, No 1, May 2010.
Jovanovich and Irena, Software Testing Methods and
Techniques, May 26, 2008.
Quick Test Professional entry in Wikipedia: Http:
//en.wikipedia.org. /wiki/HP_ Quick Test_ Professional.
Mercury Quick Test Professional tutorial, version 8.0.Mercury
Interactive Corp oration, Documentation, 2004.
Automationtesting- www.guru99.com/automationtesting. html.

120 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016

Das könnte Ihnen auch gefallen