0% found this document useful (0 votes)
63 views4 pages

Design and Implementation of Data Driven Framework Using Selenium

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views4 pages

Design and Implementation of Data Driven Framework Using Selenium

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

© 2015 IJSRSET | Volume 1 | Issue 1 | Print ISSN : 2395-1990 | Online ISSN : 2394-4099

Themed Section: Engineering and Technology

Design and Implementation of Data Driven Framework Using Selenium


Revathi. K*1, Prof. Janani. V2
Adhiyamaan College of Engineering, Hosur, India

ABSTRACT
Software testing is a process of executing a program or application with the intent of finding the software bugs. Testing
Automation would allow us to reduce the cost and will help us in increasing the quality of Software. Automation
Framework follows Data Driven Approach which passes data stored in Spreadsheet as input to the number of test scripts
written for executing test cases. Data-Driven Framework is where test input and output values are from data files and are
loaded into variables in captured or manually coded scripts. The framework should include navigation through the
program, reading of the data files, and logging of test status and information. All the processes should be in the test scripts
and each process finds the errors in the software and generates a list of errors. Those errors are properly listed in a
Spreadsheet and at the same time also contain the code area and line where it appeared, type of error and its possible
solutions. This paper includes integration of selenium and JMeter for load testing.
Keywords: Automation Testing, Selenium Webdriver, Data Driven Approach, Driver Script, Test Case, JMeter.

I. INTRODUCTION II. METHODS AND MATERIAL


Software testing services and solutions would be used in IT
sectors for large applications. The software testing About the Framework
landscape is increasingly moving towards becoming a joint 2.1. Process
effort across various levels of the organization through a  Initiation of the Testing Process
more service-driven test management process, leaving Automation Framework will start executing tests with a push
behind the traditional testing center of excellence model. A of a button and run tests on its own. It can set up the test
test automation framework is a set of assumptions, environment and preferably also check that all preconditions
concepts and tools that provide support for automated are met. It will read the Test ID from the Spreadsheet and
software testing. The main advantage of such a framework automatically start the testing process.
is the low cost for maintenance. Software  Test Execution
It is possible for us to start the test execution manually. It can
testing automation has long been recognized for its
be a convenient method because tests can be started
potential to improve testing capacity by reducing
automatically at a specified time or after a certain event.
redundant, manual operations while maximizing test
Easiest way to start execution at a certain time is making it
accuracy. Testing all these application is mandatory before
possible to start test execution manually from command line
launching them in the market. But at the same time testing and using operating system‟s features for scheduling. The
all these applications will require a lot of time and human testing process will stop automatically after generating the
effort and can also have some probability of human errors. Test Report, which will be a combination of Logger Report,
Therefore incorporating Automation in testing is another Result Report and Screenshots. The link of Test Report will
step demanded by today‟s need of technological be automatically sent to the Tester and in the Spreadsheet
advancement. Data-Driven testing means executing a set of  Verifying Test Result
steps with multiple sets of data. The Framework runs a An integral part of test execution is verifying test results.
driver script which reads the test cases from a list in a Framework will automatically verify test result as one or more
spreadsheet and accordingly selects the testing comparisons between actual outcome of a test and predefined
functions/scripts and concurrently generates a logger expected outcome. The comparison will be done by referring
report, result report and screenshots of each test case the Spreadsheet which contains a column containing the data
execution and finally generating a complete report on for Expected Result.
tested application/software, after comparison of the actual  Assigning Test Status
result with the expected result. After a test is executed and its results are verified, it is
expected from the testing framework that it generates a status

IJSRSET151162 | Received: 16 Feb 2015 | Accepted: 22 Feb 2015 | January-February 2015 [(1)1: 283-286] 283
for the same. If the test was executed without any problems The new testing automation framework integrated by
and all comparisons between actual and expected outcomes Selenium and Jmeter can share the test steps and test data
match the test gets a pass status. In every other case the status among different testing, such as UI testing, backend testing,
is fail. Besides the status every test case should also get a loading test and so on. It is convenient to switching in various
short but descriptive status message. For passed tests this types of testing for web applications. It supports multiple
message is normally not that important but with failed tests it browsers and a variety of operating system. It can be widely
can give details about the cause of the problem. used in web application test automation.

2.2. Tool Used B. Design and Implementation in Selenium IDE with


Web Driver
Selenium is an open source automation testing tool for web
based applications. It runs directly on browser and supports In the year 2012, NidhikaUppal, Vinay Chopra [2] analysis of
almost all available browsers such as Firefox, chrome, IE, selenium IDE with selenium Web Driver and finally, enhance
Opera, Safari etc. It runs on all platforms such as Windows, the Selenium IDE with using Web Driver and compatible with
Linux and Macintosh. It‟s a very useful tool for System others browser. Now days the Web applications being
functional testing and browser compatibility testing. developed to be compatible with all browsers but in Selenium
IDE tool is limited to Firefox browser only and Selenium IDE
Selenium is a browser automation tool, commonly used for cannot be tested on all browsers .If users wants to run
writing end-to-end tests of web applications. A browser recorded tests in different browsers like IE or Chrome then
automation tool does exactly what you would expect: Selenium tools web driver has features to support with others
automate the control of a browser so that repetitive tasks can browser .Integrating Selenium IDE and web driver in one
be automated. At a very high level, Selenium is a suite of single package so that recorded tests on IDE can be run as
three tools. The first of these tools, Selenium IDE, is an web driver tests from single UI [2].
extension for Firefox that allows users to record and playback Step 1: Integrating Selenium IDE and Web Driver in one
tests. The record/playback paradigm can be limiting and isn't single package so that recorded tests on IDE can be run as
suitable for many users, so the second tool in the suite, web driver tests from single UI.
Selenium Web Driver, provides APIs in a variety of languages Step 2: Selenium Web Driver and Changes done to achieve
to allow for more control and the application of standard running test cases in IE or Google Chrome from Selenium
software development practices. The final tool, Selenium IDE.
Grid, makes it possible to use the Selenium APIs to control  Multi-browser testing including improved
browser instances distributed over a grid of machines, functionality for browsers not well-supported by
allowing more tests to run in parallel. Within the project, they Selenium IDE.
are referred to as “IDE”, “Web Driver” and “Grid”. Selenium  Handling multiple frames, multiple browser
is a browser automation tool which lets you automated windows.
operations like: type, click, and selection from a drop down of  And the code that calls Batch file to execute scripts:
a web page. Step 3: Implementation: Clicking on selenium IDE window.
Running and recording testing scripts in Selenium IDE with
Related Work others browser like IE, Chrome and it can only possible with
web driver and it also improved functionality of browsers.
A. A Test Automaton Framework Based on WEB

In the year 2012, Fei Wang and Wencaai Du [1] explained C. Implementation of Selenium with JUNIT and Test-Ng
about the design the new test automation framework. The test
automation framework that was integrated by the two kinds of In the year 2012, Deepti Gaur, Dr. Rajender Singh Chhillar [3]
test automation tool Selenium and Jmeter. Jmeter developed implements selenium with different frameworks that is, junit
by Apache organization is an open source pressure test tool and testng. To create and run integration tests with
based on Java. It can be used on the server, the network or Selenium,you must complete the following steps:
other object to simulate huge loading, in different pressure  Use the Selenium IDE to record and play tests.
under a variety of testing their strength and analyze the overall  Export tests created with the Selenium IDE as JUnit tests.
performance.  Add the JUnit tests to your Java project in your IDE and
Step 1: The information about the same type of web run the tests.
applications abstracts way from the web-based test automation
framework and form into a single configuration file. A good test case is one that has high probability of finding an
Step 2: Testing the framework undiscovered error. A successful test is one that uncovers an
undiscovered error. Test Cases in Selenium are nothing but

International Journal of Scientific Research in Science, Engineering and Technology (ijsrset.com)


284
recording the Web Application and testing that again using the
Selenium tool. The IDE allows many options for running your
test case. You can run a test case all at once, stop and start it,
run it one line at a time, run a single command you are
currently developing, and you can do a batch run of an entire
test suite. Execution of test case is very flexible in the IDE.
JUnit 4 and TestNG are both very popular unit test framework
in Java. Both frameworks look very similar in functionality.

D. Data Driven Automation Testing of Web Application


Using Selenium

In the year 2011, Navaraj Javvaji, Anand Sathiyaseelan, Uma


Maheswari Selvan, [4] the goal is to set forth the approach for
“Automating the Web Applications Using SELENIUM RC. Figure 1 : Selenium Webdriver Workflow
The Data driven testing is creation of test scripts to run
together with their related data sets in the framework. The Step 1: Read the spreadsheet and select the first row.
main advantage of the automated tests is the reusability and Step 2: Store all the information about the test suite in the
also the maintenance of these tests is easy. This requires the temporary variables.
preparation of the data sheets which is completely Step 3: Choose function/test script from the function column
independent of the test automation tool. Data driven and search it in the libraries.
 If not found generate error.
framework contains some main components, they are as
 Else, pass the parameters from same row to the
follows. function.
a) ANT Script: A Script that is used to execute a set of Step 4: Execute Function.
instruction using build.xml. It is used to run single test or  Take screen shots and store in reports.
batch test. Single test could be used to execute a single  Store Reports in HTML format
test suite while batch test can be used to run multiple test  Create Log files.
suites.  Store report in excel/ sheet/spreadsheet (pass/fail
b) Reusable Library: It consists of the common functions /status)
that can be reused. It is a collection of utilities that deliver Step 5: Repeat 2 to 4 for all rows in excel sheet.
Step 6: Generate final report and store it.
the capabilities to create detailed drill down reports in
Step 7: Generate necessary report links in the spreadsheets.
different formats, help log events and save snapshots of
tests that fail
III. RESULTS AND DISCUSSION
c) Library Files: Library files consist of the major
supporting libraries files which are necessary for the
System Specifications
automation. Ex: selenium- server.jar
d) Logger: Logger is mainly designed to help the user to Selenium webdriver, java, TestNG, JUnit, JMeter;
view the step by step execution of the test scripts along
with the time stamp, execution status whether it passed or Selenium WebDriver makes directly calls to the browser using
failed. each browser‟s native support for automation. There are so
e) Test Data: Test Data contains the excel workbooks with many browsers and many programming languages there is
test data sheets holding the input values to the application need for common specification provided by WebDriver API.
under test.
f) Test Report: The test report is generated by ANT at the TestNG is a testing framework developed in the lines of JUnit
end of the test execution. The test report displays the and NUnit, however it introduces some new functionalities
overall execution status. that make it more powerful and easier to use. TestNG is an
open source automated testing framework. TestNG is similar
Existing System to JUnit (especially JUnit 4), but it is not a JUnit extension. It
Data Driven Testing: is inspired by JUnit. It is designed to be better than JUnit,
The Data driven testing is creation of test scripts to run especially when testing integrated classes. TestNG can
together with their related data sets in the framework. The generate reports based on our Selenium test results.
framework contains some main components; they are ANT
script, Reusable Library, Library Files, Logger, Test Data,
Test Report, Test Screens, Test Scripts, and Test Suite.

International Journal of Scientific Research in Science, Engineering and Technology (ijsrset.com)


285
Figure 2: Test Report

Figure 3 : Graph Result


Proposed Work -- Integration of Selenium with
JMeter

In proposed work ,integrated by Selenium and Jmeter.It can IV. CONCLUSION


share the test steps and test data among different testing, such Selenium is open source software and also a web application
as UI testing, loading test and so on. It is convenient to testing tool. In a very short span of time, Selenium automation
switching in various types of testing for web applications. It testing framework is gaining wide acceptance as a popular and
supports multiple browsers and a variety of operating system. successful mode of website automated testing. Has
It can be widely used in web application test automation. great flexibility and extensibility. Along with its tight
integration with the browser unmatched by available
Jmeter: proprietary tools. Today everything is web based thus it is
becoming more and more complex. For this, huge information
Jmeter is an Apache jmeter that can be used as a load testing platform, quick release cycle as well as quick regeneration is
tool for analyzing and measuring the performance of a variety required. This requires the web application to be
of services, with a focus on web applications. It can be used to comprehensive, expansibility and efficiency. Load testing was
simulate a heavy load on server, network or object to test its
completed after integrating selenium webdriver and JMeter.
strength or to analyze overall performance under different
load types.
V. REFERENCES
Key Features of JMeter: [1]. Fei Wang and Wencaai Du, “A Test Automation Framework
Based on WEB” proc. IEEE 11th International Conference on
Computer and Information (ACIS 12),IEEE Press, 2012, pp.
1. Cross-platform. JMeter can be run on any operating
683-687, doi:10.1109/ICIS.2012.21
system with Java. [2]. NidhikaUppal, Vinay Chopra,”Design and Implementation in
2. Scalable. When you need to create a higher load than Selenium IDE with Web Driver”International Journal of
a single machine can create, JMeter can be executed Computer Applications (0975 – 8887) Volume 46– No.12,
in a distributed mode - meaning one master JMeter May 2012.
[3]. Deepti Gaur, Dr. Rajender Singh Chhillar ,” Implementation of
machine will control a number of remote hosts.
Selenium with JUNIT and Test-Ng”, IJCSMS International
3. Multi-protocol support. The following protocols are Journal of Computer Science and Management Studies, Vol.
all supported „out-of-the-box‟: HTTP, SMTP, POP3, 12, Issue 03, Sept 2012.
LDAP, JDBC, FTP, JMS, SOAP, TCP [4]. Navaraj Javvaji, Anand Sathiyaseelan, Uma Maheswari
4. Multiple implementations of pre and post processors Selvan,”Data Driven Automation Testing of Web Application
around sampler. This provides advanced setup, Using Selenium”,Conference Proceddings,Step-Auto 2011.
[5]. Ms. RigzinAngmo, Mrs. Monika Sharma,”Selenium Tool: A
teardown parametrization and correlation capabilities
Web based Automation Testing Framework”,International
5. Various assertions to define criteria Journal of Emerging Technologies in Computational and
6. Multiple built-in and external listeners to visualize Applied Sciences (IJETCAS),2014.
and analyze performance test results [6]. Chandraprabha, Ajeet Kumar, SajalSaxena,” SYSTEMATIC
7. Integration with major build and continuous STUDY OF A WEB TESTING TOOL: SELENIUM ”
integration systems - making JMeter performance International Journal Of Advance Research In Science And
Engineering ,IJARSE, Vol. No.2, Issue No.11, November
tests part of the full software development life cycle
2013.
[7]. http://seleniumhq.org/docs/05_selenium_rc.html
[8]. http://jmeter.apache.org
[9]. http://www.w3schools.com/xsl

International Journal of Scientific Research in Science, Engineering and Technology (ijsrset.com)


286

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy