AUTOMATING THE WEB APPLICATIONS USING THE SELENIUM RC



Similar documents
GLOBAL JOURNAL OF ENGINEERING SCIENCE AND RESEARCHES

STUDY AND ANALYSIS OF AUTOMATION TESTING TECHNIQUES

SOFTWARE TESTING TRAINING COURSES CONTENTS

Software Automated Testing

Automation using Selenium

Automating Testing and Configuration Data Migration in OTM/GTM Projects using Open Source Tools By Rakesh Raveendran Oracle Consulting

Web based Automation Testing and Tools

Viewpoint. Choosing the right automation tool and framework is critical to project success. - Harsh Bajaj, Technical Test Lead ECSIVS, Infosys

Test Automation -Selenium

International Journal of Advanced Engineering Research and Science (IJAERS) Vol-2, Issue-11, Nov- 2015] ISSN:

A Comprehensive Review of Web-based Automation Testing Tools

QEx Whitepaper. Automation Testing Pillar: Selenium. Naveen Saxena. AuthOr:

QTP Open Source Test Automation Framework Introduction

Testing. Chapter. A Fresh Graduate s Guide to Software Development Tools and Technologies. CHAPTER AUTHORS Michael Atmadja Zhang Shuai Richard

WEB APPLICATION TESTING SOLUTIONS WITH SELENIUM

Exploring Web Testing Tools For Use In A Classroom

With the use of keyword driven framework, we can automate the following test scenarios for Gmail as under :-

QA Tools (QTP, QC/ALM), Selenium with Java, Mobile with Automation, Unix, SQL, SOAP UI

Selenium An Effective Weapon In The Open Source Armory

Testing Tools Content (Manual with Selenium) Levels of Testing

Web Application Testing. Web Performance Testing

DESIGN OF AUTOMATION SCRIPTS EXECUTION APPLICATION FOR SELENIUM WEBDRIVER AND TestNG FRAMEWORK

GUI Test Automation How-To Tips

Test Automation Framework

Social Network Website to Monitor Behavior Change Design Document

Certified Selenium Professional VS-1083

Selenium Open Source Test Automation Framework FAQ

Automated testing for Mobility New age applications require New age Mobility solutions

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

BDD FOR AUTOMATING WEB APPLICATION TESTING. Stephen de Vries

Data Driven Automation Testing Framework

Performance Analysis of Lucene Index on HBase Environment

Selenium WebDriver. Gianluca Carbone. Selenium WebDriver 1

Continuous Integration

Data Driven Testing Framework using Selenium WebDriver

MDT: Middle Tire Automation Testing Framework

Magento Test Automation Framework User's Guide

GLOBAL CONSULTING SERVICES TOOLS FOR WEBMETHODS Software AG. All rights reserved. For internal use only

Testhouse Training Portfolio

Know the Difference. Unified Functional Testing (UFT) and Lean Functional Testing (LeanFT) from HP

Basic Unix/Linux 1. Software Testing Interview Prep

Open2Test Test Automation Framework for SilkTest - Introduction

Performance Evaluation & Comparison of Software Testing Tool

Unit Testing webmethods Integrations using JUnit Practicing TDD for EAI projects

Meta-Framework: A New Pattern for Test Automation

Selenium Automation set up with TestNG and Eclipse- A Beginners Guide

Comparative Analysis of Open Source Automated Software Testing Tools: Selenium, Sikuli and Watir

Comparative Analysis of Various Automated Test Tools for Flex Application

Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide

"Selecting Mobile Application Automation Tools"

Aspire's Approach to Test Automation

TestTrack Test Case Management Quick Start Guide

Keyword-Driven Testing Framework For Android Applications

Regression & Load Testing BI EE 11g

Introduction to Automated Testing

Higher Focus on Quality. Pressure on Testing Budgets. ? Short Release Cycles. Your key to Effortless Automation. OpKey TM

Benefits of Test Automation for Agile Testing

}w!"#$%&'()+,-./012345<ya

Perfect Your Mobile App with Load Testing and Test Automation

Evaluation of Load/Stress tools for Web Applications testing

Sandesh Prasanna Kumar

Mobile Test Automation Framework

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

High Level Design Distributed Network Traffic Controller

Introduction to Selenium Using Java Language

Test Automation Tool comparison HP UFT/QTP vs. Selenium - Prashant Malhotra

Software Development Tools

A Keyword Driven Framework for Testing Web Applications

Latest Trends in Testing. Ajay K Chhokra

Th3 - Open Source Tools for Test Management

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Module 4: File Reading. Module 5: Database connection

Automation Guide for SAP Regression Testing. Author: Bhavana Pande

Simple Mobile Application & Browser Testing

HPC PORTAL DEVELOPMENT PLATFORM

QA Tools (QTP, QC/ALM), ETL Testing, Selenium, Mobile, Unix, SQL, SOAP UI

Meister Going Beyond Maven

a new generation software test automation framework - CIVIM

"Build and Test in the Cloud "

SOA Solutions & Middleware Testing: White Paper

Enable Your Automated Web App Testing by WebDriver. Yugang Fan Intel

Run your own Oracle Database Benchmarks with Hammerora

Data Center Virtualization and Cloud QA Expertise

Business Application Services Testing

Load Testing Ajax Apps using head-less browser tools. NoVaTAIG April 13, 2011 Gopal Addada and Frank Hurley Cigital Inc.

TESTING FRAMEWORKS. Gayatri Ghanakota

Test Automation Process

WHITE PAPER on Test Automation Framework Using MBT. Dec 2013

Comparative Study of Automated Testing Tools: Quick Test Pro and Load Runner

Test Automation Integration with Test Management QAComplete

Quality Assurance Training Program

View Point. Developing a successful Point-of-Sale (POS) test automation strategy. Abstract. - Sujith George

Performance Testing. Why is important? An introduction. Why is important? Delivering Excellence in Software Engineering

MSWL Development & Tool. Eclipse IDE

Transcription:

AUTOMATING THE WEB APPLICATIONS USING THE SELENIUM RC Mrs. Y.C. Kulkarni Assistant Professor (Department of Information Technology) Bharati Vidyapeeth Deemed University, College of Engineering, Pune, India Mr. Ajeet A. Ghodeswar M.Tech. (Information Technology) Bharati Vidyapeeth Deemed University, College of Engineering, Pune, India Abstract The goal of this paper is to set forth the approach for Automating the Web Applications Using SELENIUM RC (an open source test automation tool). Selenium Remote Control (RC) is a test tool that simulates web browsers and supports six programming languages. Many software applications today are written as web-based applications to be run in an Internet browser. Selenium is a set of powerful different software tools working with many browsers, operating systems, programming languages, and testing frameworks each with a different approach to supporting automation test for testing web-based applications. JMeter is used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. JMeter operates at the protocollevel, on the other hand, Selenium works at the user-level. With the use of the software framework, we efficiently improve the extensibility and reusability of automated test. Selenium RC provides only basic functionalities using the client drivers. But there is an effective way of expanding the functionalities by implementing the thought process to capture user actions automatically, creates a customized logger file, generation of customized test summary report. Keywords: selenium; web; jmeter; automation testing framework I. Introduction Recent progress in the Software Automation Industry has shown a tremendous framework implementation in order to execute test cases for bringing out a better quality web application. As millions of people are spending many hours of time in internet, due to which, the web applications are becoming more popular and increasingly more complex since the goal of it, is to impress and gain the potential market place. Thus the need for the code quality and maintainability has grown drastically and as a result, the need for testing of these applications has become more important. Testing the web application during the application development phase has become an integral part of the Software Development Life Cycle (S.D.L.C) and these tests are typically planned to check the functionality of the application. As the web applications face a lot of enhancements, probability of conducting repetitive testing of the application functionality goes high and thus we go for test automation in place of regression testing. Test Automation is a strategic approach designed in a form of a framework to gain control over the execution of the tests. The acceptance test of web applications often involves some manual tasks. Doing it manually, the operating personnel human error can occur easily. At the same, it wastes the time. The web-based applications were bearing the more and more complex business logic and more and more huge information platform formation, along with the characteristics of short release cycle and the quick regeneration. This requires the web application tests to be of 1

comprehensiveness, expansibility and efficiency. The Browser carrying on web applications also was emerging in diversification and pluralism. It also increases complexity and workload for the web application testing. More attention should be paid to the web application testing efficiency, reusability, and comprehensiveness. Aim at some problem mentioned above, the paper presents the test automation framework that was integrated by the two kinds of test automation tool Selenium and Jmeter. Common Web test automation tools, such as QTP, Win Runner Load Runner, Robot, SilkTest, and Selenium are used widely in automation test. Selenium can be said to be the most comprehensive of open source Web test automation tools, especially well support to the Web application which employed the BackBase framework. Jmeter, Grinder, Multi-Mechanize, OpenSTA are common pressure test tools. However, Jmeter developed by Apache organization is an open source pressure test tool based on Java. It can be used on the server, the network or other object to simulate huge loading, in different pressure under a variety of testing their strength and analyze the overall performance, beyond that, it takes some kinds of test result reports. Implement of the test automation framework shows that the test automation framework is convenient to carry on function test, performance testing, and loading test in web applications. It also shows that it has better test performance in reusability, extensibility, comprehensiveness, and feasibility. We are all known that Selenium and JMeter software testing framework tools work at the different levels. Selenium works at the user-level while JMeter operates at the protocol-level. In order to easy to carry on different tests for a web applications and to share testing procedures and test data between different kinds of tests, this paper presents one test automation framework by an integration of Selenium and Jmeter. II. Technical Overview A. Selenium Initially developed by Jason Huggins and released in 2004. Selenium is very famous as it is an open source suite of tools specifically developed for testing web applications. It supports a test domain specific language (DSL) to execute tests in many programming languages such as C#, Java, Ruby, Groovy, Python, PHP, and Perl., B. Selenium IDE It is a Mozilla Firefox add-on which is capable of recording the user actions and also playback. Since selenium IDE is an integrated development environment, Tester can also edit and debug the tests in above mentioned languages. Latest version of Selenium IDE is 1.0.10. C. Selenium RC It is a server / solution for executing linear / regression / integration tests. RC obtains the commands from the selenium server and run the tests via the browser. Recorded user actions from the selenium IDE can be obtained in any supported programming language then imported to eclipse for test case/suite execution. It contains the client drivers such as dot net, java, Perl, Php, python, ruby and the selenium server. 2

D. Eclipse Java EE IDE: It is an extensible open source IDE. It provides a number of aids that makes programmers /testers write code much quicker and easier than using a text editor. This means that a person can spend more time learning Java, less time typing. Here eclipse IDE is user to write test cases and execute it. III. AUTOMATION FRAMEWORK A. Well known automation frameworks A Test Automation Framework is an integrated system that combines the set of assumptions, concepts and tools which provides support for automated software testing. The main advantage of such a framework is it defines the organization s way of doing things as a unique standard. If there is change to any test case then only the test case needs to be updated and the test suite and ANT script will remain the same. There are several types of automation frameworks; some of the most commonly known frameworks include the following: 1) Data-driven testing 2) Modularity-driven testing 3) Keyword-driven testing 4) Hybrid testing 5) Model-based testing B. Selenium Based Test Automation Framework Figure 1: framework structure 3

Till now we have a clear idea on the fundamental concepts of Selenium, eclipse and data driven framework, the next step will be to come up with a basic design for the overall test automation architecture. The framework contains some main components, they are as follows. A. ANT script B. Reusable Library C. Library Files D. Logger E. Test Data F. Test Report G. Test Screens H. Test Scripts I. Test Suite A. ANT script A Script that is used to execute a set of instruction using build.xml. It is used to run single test or batch test. Single test could be used to execute a single test suite while batch test can be used to run multiple test suites. B. Reusable Library Reusable library consists of the common functions that can be reused. Reusable library consist of those functions that are application independent and can be called to perform certain tasks. It can also consist of a group of tools or utilities that will enhance the overall automation framework. In this case the reusable library is a collection of utilities that deliver the capabilities to create detailed drill down reports in different formats, help log events and save snapshots of tests that fail (snap shots or screen shots of failures). C. Library Files Library files consist of the major supporting libraries files which are necessary for the automation. For ex: selenium-server.jar, selenium-java-client-driver.jar. D. Logger Logger is mainly designed to help the user to view the step by step execution of the test scripts along with the time stamp, execution status whether it passed or failed. The logger component of the framework can be customized in many ways as per the user s knowledge. E. Test Data Test Data contains the excel workbooks with test data sheets holding the input values to the application under test. F. Test Report The test report is generated by ANT at the end of the test execution. The test report displays the overall execution status. G. Test Screens As mentioned earlier reusable functions are called to capture the screen shot of the failed tests. The test screen can be customized by the user in the script and could be used to capture the screen shot of the AUT where ever it is required. For Ex: User Name, Password entered wrong. The error message is used as an assertion to trigger the screen capture. H. Test Scripts The test scripts are the.java files which represents the test cases of the AUT. I. Test Suite Test suite is set up to cover execution of the specified test case name and the priority of the execution takes place contiguously. IV. Testing Automation Framework Design and Implementation 4

The information about the same type of web applications abstracts way from the web-based test automation framework and form into a single configuration file. By doing so, we ensure that test automation framework and the application to be tested should be avoided interfere with each other, relatively independent. The test automation framework divides diversity interface elements and polygonal interface elements into non-variance elements and variable collection of space. It ensures that this test automation framework can be compatible with the same type of many applications, does not need any modification. We have designed a test automation framework by employing selenium test tools with supporting a variety of Web browser for solving web applications compatibility across the browsers (Figure 2). It provides testers with a simple interface. It lets testers to configure different browsers conveniently for web application test. In order to provide testers with tool to simulate browser to send a variety of reasons of request functions to a web application server, Jmeter function was integrated into the test automation framework designed in this paper. It will do not cause any inconvenience to the performance test in which the browser was opened and PC resources were occupied. At the same time, a test automation framework can prepare a mass of data for performance test by directly configure data resources. In order to ensure universality, the test automation framework designed in our work not only provides testers with unified test cases, but also leaves the extensibility space for introducing other test tools in the future. Using the new test automation framework, testers can configure a test type easily just through modifying a test type and can switch among different tests without altering any elements related to test cases. Figure 2: a web-based test automation framework A. General Structure of the Integrated Automation Testing Framework 5

The integrated auto testing framework designed in this paper includes five components listed the following (Figure 3): implement name of workers (Translator, Action worker, Comparator, test result Collector). Model: This component contains the object model which is converted from XML. Such as Action, Assertion, Element, ApplicationData, Cases, ToolsSetting. Translator has two steps. The first step is to translate each test case into sets of actions related to the different testing types, such as UI, backend, and loading test. The second step is to translate each set of actions into specific tools' commands/scripts depending on the tool employed in doing the actual testing. ActionWorker function is to call the corresponding tool to do the specific actions. Comparator function is to compare the test result with the expected result. Comparator has two parts. One is to collect the test result and expected result. Another is to compare against the expected result. Figure 3: component diagram a) Model (Overall Entity) These classes in the below are entity, and they relate to the testsuite XML, application background XML (Refer to Figure 4). b) Function Description Functional tests are intended to help testers verify that a system, as a whole, functions as intended. Such tests verify that everything is wired together correctly. Therefore, we define a set of functions for the new test automation framework. c) Overall Process Flow The testing framework has basic five steps: 1) By using xmlobjectconvertor() to convert the test case to Test Case entity, convert the test steps of test case to TestCaseAction entity, convert the assertion of test case to Assertion entity, convert the application background xml to ApplicatonData entity; 6

2) To combined the test cases with application data; 3) By using translate() function to translate the case to TestToolCase; 4) To call the specific actionworker for specific testing tool to do the TestToolAction with the doaction() function; 5) To collect the test result for the specific testing tool by collecttestresult() function, and collect the expected test result by collectexpectedresult(), then compare the test result with the expected result with compare() function. B. The hierarchical structures of The Integrated Automation Testing Framework Figure 4. Overall entities A) Translator Translator has two levels. Translate the test case which is prepared by tester to a tool test case which can be recognized by a specific test tool. The translator layer process flow like the following: 1. To get a translator name with a specific test type by gettranslatorname() function; 2. To translate the test case to a scope testcase with a specific translator name by gettranslatorinstance() and translate() functions ; 3. To get a translator name with a specific test tool by gettooltranslatorname() function; 4. To get a tool testcase from a scope test case by the translator by gettooltranlsatorinstance() and translate() functions. B) ActionWorker This component creates a specific actionworker and then does the specific actions. The actionworker layer process flow like the following: 1) To get a actionworker name by getactionwokername() function; 2) To get a actionworker instance by getactionworkerinstance() function; 3) To do action by doaction() function with the actionworker in the last step. C) Comparator This component can make sure whether the test case is successful or not. This component collects the test result and collects expected result, and then do the comparison on the two 7

kinds result. The main steps are listed in the following: 1) To get an instance test result collector to collecttestresult() from the gettestresultcollectorinstance() function with gettestresultcollectorname(); 2) To collect the expected result of the running test case by collectexpectedresult(); 3) To get an instance comparator from the getcomparatorinstance() function with the getcomparatorname() function; 4) To compare the test result with the expected result by compare() function, and then give the result of comparing. V. Testing the Framework The web-based test automation framework, like any another being developed, needs testing. As a new test automation framework, there are no tests to perform and all tests need. We must evaluate its performance of reusability, extensibility, compatibility, and universality in particular. In order to test the performance of sharing test processes and test data between UI test and performance test. The test processes are designed as following: Step1. To prepare all data for IU system and data for test tools configuration item, that is, to prepare the test cases and test type configuration file for both UI test and load test. Step2. To launch the test automation framework, start UI test for IU system, modify default browser class of configuration items in test tools Step3. To Change test type into load test first, and then to launch the test automation framework, final modify test parameters of load test for examples, each request spacing interval, How many requests launch at same time, How many threads need to implement these requests? VI. Conclusion The new testing automation framework integrated by Selenium and Jmeter can share the test steps and test data among different testing, such as UI testing, backend testing, loading test and so on. It is convenient to switching in various types of testing for web applications. It supports multiple browsers and a variety of operating system. It can be widely used in web application test automation. References [1] Fei Wang,Wencai DU, A Test Automation Framework Base on WEB, 2012 IEEE/ACIS 11th International Conference on Computer and Information Science [2] Navaraj Javvaji, Anand Sathiyaseelan, Uma Maheswari Selvan, Data Driven Automation Testing of Web Application using Selenium, STEP-AUTO 2011 [3] Ying Wu, Automation Testing Framework for web base on web base on selenium. Information Techonlogy[J],2011,9:187-188 [4] McMahon, C., History of a Large Test Automation Project Using Selenium 2009,8 [5] http://www.methodsandtools.com/tools/tools.php?jmeter [6] http://seleniumhq.org/docs/05_selenium_rc.html [7] http://jmeter.apache.org/ [8] http://xstream.codehaus.org/ [9] http://www.w3schools.com/xsl/ 8