SURVEY ON SELENIUM TOOL IN SOFTWARE TESTING Insha Altaf 1 Department ofComputer Sience and Engineering Amit Universit Noida, India [email protected] Firdous ul Rashid 3 Department ofComputer Science and Engineering Islamic Universit OfScience & technolog [email protected] ABSTRACT--- We are moving towards a general public where web is the need of hour. Today the vast majority of the product applications executed, are composed as online applications which are keep running in a web program. Testing programming applications is critical. Numerous associations make utilization of a specifc web application, so the same web applications are tried habitually by diverse clients from distinctive regions physically. Testing a web application physically is tedious, so we go for test automation. In test automation we make utilization of a product device to run repeatable tests against the application to be tried. There are various focal points of test automation. They are exceptionally exact and have more prominent preparing pace when contrasted with manual automation. There are various open source and business devices accessible for test mechanization. Selenium is one of the broadly utilized open source device for test computerization. Test automation enhances the effectiveness of programming testing procedures. Test automation gives quick criticism to engineers. It additionally discovers the imperfections when one may miss in the manual testing. In test automation we can perform boundless emphases for testing the same example of code ceaselessly commonly. KEYWORS : selenium, aka.selenium, selenium grid,selenium control, selenium ide, web driver, test case, RC. I. INTRODUCTION Web testing is a vital classifcation of programming testing that concentrates generally on web applications. Complete testing of an electronic application is essential with a specifc end goal to recognize and adjust the blunders, before it is uncovered to the general population. We have various web application execution devices accessible. We utilize them to test the web applications and web related interfaces. Regardless of testing web applications, we can test web 978-1-4673-7910-6/15/$31.00 ©2015 IEEE 1378 Jawad Ahmad Dar 2 Department ofComputer Sience and Engineering Islamic Universit OfScience & technolog Kashmir, India [email protected] Mohd. Rafq 4 Department ofComputer Science and Engineering Islamic Universit ofScience & technolog [email protected] servers, sites and other web interfaces by making utilization of automation web testing[1]. PROBLEM STATEMENT Testing is a fndamental piece of programmmg advancement since it gives you a chance to gauge programming quality. Without testing, there is no real way to confrm that the product works accurately and bugs may be littered all through the application and lef unfound. Testing is frequently done physically, by analyzers performing operations, orderly, and showing whether a specifc step was profcient effectively or whether it fzzled. In any case, manual testing is a fll-time exertion, excessive and frequently inclined to human mistake. Programming tests must be rehashed regularly amid improvement cycles to guarantee quality. Each time source code is changed programming tests ought to be rehashed. For every arrival of the product it might be tried on all upheld working frameworks and equipment arrangements. Physically rehashing these tests is unreasonable and tedious. II. REVIEW OF SELENIUM Selenium appeared in 2004. The individual behind its presence was Jason Huggins. He is the maker and engineer of selenium. He began his work when he was trying an interior application physically at thought works and he understood that he can improve utilization of his time instead of physically going through the same steps. He began his work with java script and made a library in java scripting that can interface with the site page and can run the same test naturally commonly against numerous programs. That java script library then got to be Selenium Core, which contains every one of the properties of Selenium Remote Control (RC) [4] and Selenium IDE [5]. Probably Selenium was an enormous device, yet it additionally had its pros[2]. The security of Selenium was not all that precise because of which a portion of the things were difcult to do in Selenium[3].Web applications were turing out to be more effective and complex step by step, so it was turing out to be extremely hard to handle them by making utilization of Selenium. Simon Stewart, engineer at Google, began chipping away at a venture and called it as web Driver. Google was unreasonably making utilization of Selenium, however analyzers were taking a shot at the constraints of the item. Simon Stewart was looking for a web testing device that will talked specifcally to the web program utilizing the local strategy for the program and working famework. The Web Driver became an integral factor with the point of settling the restrictions of Selenium in 2008[4]. III. CHOOSING THE SELENIUM TOOL Numerous individuals begin with Selenium IDE. On the off chance that you are not offcially experienced with a programming or scripting dialect you can utilize Selenium IDE to get acquainted with Selenium orders. By making utilization of Selenium IDE, you can make various tests inside rapidly inside of seconds. It's not generally important to do every one of the computerizations utilizing Selenium IDE. So as to viably make utilization of Selenium, one ought to assemble and run tests utilizing either Selenium 2 or Selenium 1 in conjunction with one of the bolstered programming dialects. Presently the inquiry emerges, which one you pick and it relies on upon you. At the season of composing the Selenium, engineers are anticipating the Selenium-Web Driver API being the fture course for Selenium. Selenium 1 is accommodated in reverse compatibiIity[6]. BROWSERS AND PLATFORMS SUPPORTED BY SELENIUM The web programs upheld by Selenium 2.0 shifs, contingent upon whether you are utilizing Selenium-Web Driver or Selenium-RC. Selenium-Web Driver backings the accompanying programs alongside the working frameworks these programs are good with[9].Google Chrome 12.0.712.0+ • Interet Explorer 6, 7, 8, 9 - 32 and 64-bit where applicable • Firefox 3.0, 3.5, 3.6, 4.0, 5.0, 6, 7 • Opera 11.5+ • HtmlUnit 2.9 • Android - 2.3+ for phones and tablets (devices & emulators) • iOS 3+ for phones (devices & emulators) and 3.2+ for tablets (devices & emulators) IV. INTRODUCTION TO SELENIUM-IDE The Selenium-IDE (Integrated Development Environment) is the instrument you use to build up your Selenium experiments. It's a simple to-utilize Firefox module and is for the most part the most effective approach to create experiments. It likewise contains a setting menu that permits you to frst select a UI component from the program's right now shown page and aferward select fom a rundown of Selenium orders with parameters pre-characterized by connection of the chose UI component. This is a period saver, as well as a superb method for learing Selenium script syntax[5]. IDE FEATURES Menu Bar: The File menu has alteratives for Test Case and Test (suite of Test Cases). Utilizing these you can include another Test Case, open a Test Case, spare a Test Case, and fare Test Case in a dialect of your decision. You can likewise open the late Test Case. Every one of these alteratives are additionally accessible for Test Suite[7]. The Edit menu permits duplicate, glue, erase, fx, and select all operations for altering the orders in your experiment. The Options menu permits the changing of settings. You can set the timeout esteem for specifc orders, add client characterized client expansions to the base arrangement of Selenium summons, and determine the organization (dialect) utilized when sparing your experiments. The Help menu is the standard Firefox Help menu; one and only thing on this menu-UI-Element Documentation-pertains to SeleniumIDE Toolbar: The toolbar contains catches for controlling the execution of your experiments, including a stage highlight for investigating your test cases[10]. Test Case Pane: Your script is shown in the experiment sheet. It has two tabs, one for showing the charge and their parameters in a lucid "table" organization. The other tab - Source shows the experiment in the local organization in which the record will be put away. As a matter of course, this is HTML in spite of the fact that it can be changed to a programming dialect, for example, Java or C#, or a scripting dialect like Python. See the Options menu for points of interest. The Source see likewise permits one to alter the experiment in its crude structure, including duplicate, cut and glue operations[11]. The Command, Target, and Value passage felds show the at present chose order alongside its parameters. These are passage felds where you can adjust the as of now chose order. The primary parameter determined for a charge in the Reference tab of the base sheet dependably goes in the Target feld. In the event that a second parameter is indicated by the Reference tab, it generally goes in the Value feld[12]. Roll up pane The base sheet is utilized for four distinctive fnctions-Log, Reference, UI-Element, and Rollup Log When you run your experiment, mistake messages and data messages demonstrating the advancement are shown in this sheet naturally, regardless of the possibility that you don't frst choose the Log tab. These messages are fequently valuable for experiment troubleshooting. Notice the Clear catch for clearing the Log. Likewise see the Info catch is a 2015 Interational Conference on Green Computing and Interet of Things (ICGCloT) 1379drop-down permitting determination of distinctive levels of data to log[13]. VI Element and Roll-up Point by point data on these two sheets (which cover propelled components) can be found in the VI-Element Documentation on the Help menu of Selenium-IDE. V. BUILDING TEST CASES There are three essential systems for creating experiments. Every now and again, a test designer will require each of the three strategies. Recording: Adding Verifcations and Asserts With the Context Menu Your experiments will likewise need to check the properties of a page. This requires state and check orders. We won't depict the specifcs of these orders here; that is in the part on Selenium Commands - "Selenese". Here we'll basically depict how to add them to your test case.With Selenium-IDE recording, go to the program showing your test application and right snap anyplace on the page.The frst time you utilize Selenium, there may just be one Selenium charge recorded. As you utilize the IDE anyway, you will discover extra charges will rapidly be added to this menu. Selenium-IDE will endeavor to anticipate what order, alongside the parameters, you will requirement for a chose VI component on the present site page. How about we perceive how this fnctions. Open a website page of your picking and select a square of content on the page. A section or a heading will work fne. Presently, righttap the chose content. The connection menu ought to give you a confrm Text Present order and the recommended parameter ought to be the content itself4]. Additionally, see the Show All Available Commands menu choice. This shows numerous, numerous more orders, once more, alongside recommended parameters, for testing your as of now chose UI component. Attempt a couple of more VI components. Attempt rightclicking a picture, or a client control like a catch or a checkbox. You may need to utilize Show All Available Commands to see choices other than check Text Present. When you select these different choices, the all the more generally utilized ones will appear on the essential connection menu. For instance, selecting confrm Element Present for a picture ought to later cause that summon to be accessible on the essential setting menu whenever you select a picture and right-click[ 14]. Once more, these orders will be clarifed in point of interest in the section on Selenium charges. For the present however, don't hesitate to utilize the IDE to record and select orders into an experiment and aferward run it. You can take in a great deal about the Selenium summons basically by exploring different avenues regarding the ID Opening and Saving a Test Case Like most projects, there are Save and Open orders under the File menu [II]. Nonetheless, Selenium recognizes experiments and test suites. To spare your Selenium-IDE tests for later utilize you can either spare the individual experiments, or spare the test suite. On the off chance that the experiments of your test suite have not been spared, you'll be incited to spare them before sparing the test suite. When you open a current experiment or suite, Selenium-IDE shows its Selenium charges in the Test Case Pane. Running Test Cases The IDE permits numerous alteratives for running your experiment. You can run an experiment at the same time, stop and begin it, run it one line at once, run a solitar summon you are at present creating, and you can do a cluster keep running of a whole test suite. Execution of experiments is extremely adaptable in the IDE. Run a Test Case Click the Run button to run the currently displayed test case. VI. SELENIUM RC As you can read in Brief History of The Selenium Project, Selenium RC was the main Selenium project for a long time, before the Web Driver/Selenium merge brought up Selenium 2, the newest and more powerfl tool[7]. Selenium I is still actively supported (mostly in maintenance mode) and provides some features that may not be available in Selenium 2 for a while, including support for several languages (Java, JavaScript, Ruby, PHP, Python, Perl and C#) and support for almost every browser out there. VII. HOW SELENIUM RC WORKS First, we will describe how the components of Selenium RC operate and the role each plays in running your test scripts. RC COMPONENTS Selenium RC segments are: The Selenium Server which dispatches and murders programs, translates and runs the Selenese charges breezed through fom the test program, and goes about as a HTTPproxy, catching and checking HTTP messages went between the program and the AVT. Client libraries which give the interface between every programming dialect and the Selenium RC Server SELENIUM SERVER Selenium Server gets Selenium orders fom your test project, translates them, and reports back to your system the consequences of running those tests. The RC server packs Selenium Core and naturally infses it into the program. This happens when your test system opens the program (utilizing a customer librar API capacity). Selenium-Core is a JavaScript program, really an arrangement of JavaScript capacities which translates and executes Selenese orders utilizing the program's fabricated as a part of JavaScript interpreter[ 11]. 1380 2015 Interational Conference on Green Computing and Interet of Things (ICGCloT)The Server gets the Selenese summons from your test project utilizing basic HTTP GET/POST asks. This implies you can utilize any programming dialect that can send HTTP solicitations to mechanize Selenium tests on the program. CLIENT LIBRARIES The customer libraries give the programming bolster that permits you to run Selenium charges from your very own system plan. There is an alterate customer library for each upheld dialect. A Selenium customer library gives a programming interface (API), [9] i.e., an arrangement of capacities, which run Selenium, summons from your own project. Inside of every interface, there is a programming capacity that backings each Selenese command[lO]. The customer library takes a Selenese order and passes it to the Selenium Server for handling a particular activity or test against the application under test (AUT). The customer library additionally gets the consequence of that summon and passes it back to your project. Your project can get the outcome and store it into a system variable and report it as a win or disappointment, or conceivably make remedial move on the off chance that it was a surprising mistake. So to make a test program, you essentially compose a program that runs an arrangement of Selenium charges utilizing a customer library API. What's more, alteratively, on the off chance that you as of now have a Selenese test script made in the Selenium-IDE, you can produce the Selenium RC code. The Selenium-IDE can decipher (utilizing its Export menu thing) its Selenium charges into a customer driver's API capacity calls. See the Selenium-IDE section for specifcs on sending out RC code from SeleniumIDE[9]. CONS 1) Switching between the different occurrences of the same program is impractical. 2) Switching between the numerous occurrences of the distinctive programs is unrealistic. 3) Browser route, similar to back and frward catch copies is impractical. 4) Limited components regarding move and customize of items. 5) To work with Ajax based UI components there are extremely restricted elements arrive with Selenium RC. To defeat the above impediments we utilize selenium web driver or Google web driver. WEB DRIVER AND THE SELENIUM SERVER You may, or may not, require the Selenium Server, contingent upon how you expect to utilize Selenium-Web Driver. On the off chance that you will be just utilizing the Web Driver API you needn't bother with the SeleniumServer. On the off chance that your program and tests will all keep running on the same machine, and your tests just utilize the Web Driver API, then you don't have to run the Selenium-Server; Web Driver will run the program straightforwardly. There are a few reasons however to utilize the SeleniumServer with Selenium-Web Driver. • You are utilizing Selenium-Grid to disperse your tests over numerous machines or virtual machines (VMs). • You need to associate with a remote machine that has a specifc program form that is not on your present machine. • You are not utilizing the Java ties (i.e. Python, C#, or Ruby) and might want to utilize Html Unit VIII. SETTING UP A SELENIUM WEB DRIVER PROJECT To introduce Selenium intends to set up an undertaking in an advancement so you can compose a project utilizing Selenium. How you do this relies on upon your programming dialect and your advancement surroundings. JAVA The least demanding approach to set up a Selenium 2.0 Java undertaking is to utilize Maven. Expert will download the java ties (the Selenium 2.0 java customer library) and every one of its conditions, and will make the undertaking for you, utilizing an expert pom.xml (venture setup) record. Once you've done this, you can import the expert undertaking into your favored IDE, Intelld IDEA or Eclipse[ll]. To start with, make an organizer to contain your Selenium venture records. At that point, to utilize Maven, you require a pom.xml record. This can be made with a content manager. We won't show the points of interest of pom.xml records or for utilizing Maven since there are now superb references on this. Your pom.xml document will look something like this. Make this record in the envelope you made for your project[11]. Make sure you determine the most current rendition. At the season of composing, the adaptation recorded above was the most ebb and flow; however there were regular discharges instantly afer the arrival of Selenium 2.0[11]. This will download Selenium and every one of its conditions and will add them to the undertaking. At last, import the undertaking into your favored advancement environment. For those not acquainted with this, we've given a reference section which demonstrates this. CONS A standout amongst the most disservice of selenium web driver to mechanize the security destinations (HTTPS) can't perform the techniques for attachment programming (i.e. can't ready to get the HTTPS reaction code) If HTTPS 2015 Interational Conference on Green Computing and Interet of Things (ICGCloT) 1381reaction code=200 - Successflly joined with web application SELENIUM GRID Selenium-Grid permits you run your tests on diverse machines against distinctive programs in parallel. That is, running various tests in the meantime against diverse machines running distinctive programs and working fameworks. Basically, Selenium-Grid[8] bolster disseminated test execution. It takes into account running your tests in an appropriated test execution environment[12]. WHEN TO USE IT For the most part talking, there are two reasons why you might need to utilize Selenium-Grid. To run your tests against numerous programs, various renditions of program, and programs running on diverse working frameworks. To lessen the time it takes for the test suite to fnish a test pass. Selenium-Grid is utilized to accelerate the execution of a test go by utilizing different machines to run tests in parallel. For instance, in the event that you have a suite of 100 tests, however you set up Selenium-Grid to bolster 4 unique machines (VMs or separate physical machines) to run those tests, your test suite will fnish in (around) one-fourth the time as it would on the off chance that you ran your tests successively on a solitary machine. For substantial test suites, and long-running test suite, for example, those performing a lot of information approval, this can be a huge help. Some test suites can take hours to run. Another motivation to support the time spent running the suite is to abbreviate the turaround time for test results afer designers registration code for the AUT. Progressively programming groups honing spry programming improvement need test input as quickly as could be expected under the circumstances instead of sit tight overight for an overight test pass[13]. Selenium-Grid is additionally used to bolster running tests against numerous runtime situations, particularly, against distinctive programs in the meantime. For instance, a "matrix" of virtual machines can be setup with every supporting an alterate program that the application to be tried must backing. In this way, machine 1 has Interet Explorer 8, machine 2, Interet Explorer 9, machine 3 the most recent Chrome, and machine 4 the most recent Firefox. At the point when the test suite is run, Selenium-Grid gets every test-program mix and assigs every test to keep running against it's required browser[11]. What's more, one can have a matrix of all the same program, sort and form. For example, one could have a matrix of 4 machines every running 3 occasions of Firefox 12, taking into consideration a 'server-ranch' (it could be said) of accessible Firefox occurrences. At the point when the suite runs, every test is gone to Selenium-Grid which doles out the test to the following accessible Firefox example. In this way one gets test fnish where possibly 12 tests are all running in the meantime in parallel, altogether decreasing the time required to fnish a test pass[17]. Selenium-Grid is extremely adaptable. These two illustrations can be consolidated to permit various occurrences of every program sort and form. A design, for example, this would give both, parallel execution for quick test pass consummation and backing for various program sorts and forms simultaneously[17] IX. CHALLENGES As you know Selenium is a free ware open source testing tool. There are many challenges with Selenium. One of the biggest drawbacks with user interface testing tools is that they're slow for various reasons. One way to bring the test run times down is to run them in parallel on a grid of servers, Engineers would be more likely to run automated browser UI tests if they could run 1000 tests in 1 minute total time on 1000 machines instead of 1000 tests in 1000 minutes on 1 machine. Sadly, though, most projects allocate only one machine, maybe two, to browser testing. Selenium supports only web based applications. It doesn't support any non-web based (Like Win 32, Java Applet, Java Swing, .Net Client Server etc.) applications. When you compare selenium with QTP, Silk Test, Test Partner and RFT, there are many challenges in terms of maintainability of the test cases. Since Selenium is a freeware tool, there is no direct support if one is in trouble with the support of applications. There are many challenges if one has to interact with Win 32 windows even when you are working with Web based applications. Bitmap comparison is not supported by Selenium. Any reporting related capabilities, you need to depend on third party tools. Selenium sometimes can't even automate on web applications under some circumstances: 1) For example when the application is made in flash. 2) Or the application has custom objects or objects that can be inspected or that code can't be viewed for example silver light applications[15]. Selenium has no reporting capabilities so we have to use JauntiFitness/Testing or any other test runner. X. CONCLUSION Improvement on Selenium is continuing at an enraged pace, and new elements are included day by day. Backing is amazing; the Selenium designers are greatly receptive to every one of the inquiries tended to the selenium-clients and selenium-level mailing records. Selenium computerizes programs. It is intended for mechanizing web applications for testing purposes, yet is surely not restricted to simply that. Exhausting electronic organization errands can (and ought to!) likewise be computerized too. Selenium has the backing of a portion of the biggest program merchants who have taken (or are taking) strides to make Selenium a local piece of their program. It is additionally the center innovation in innumerable other program robotization instruments, APIs and systems. Selenium (each instrument of the Selenium suite) collaborates with the UI components of a site/application utilizing JavaScript infsion. In this manner a custom intermediary server is utilized to infse the JavaScript code into the html source. At the point when 1382 2015 Interational Conference on Green Computing and Interet of Things (ICGCloT)utilizing the Selenium IDE this enchantment is done consequently. It not, Selenium RC is utilized to control the html source to be robotize capable. The Selenium IDE is the least demanding and speediest route (as indicated by the Selenium apparatus suite) to make tests (utilizing the catch motor) and replay them a short time later inside the program. On the off chance that you need to make brisk bug multiplication scripts and to help in robotization supported exploratory testing, Then you need to utilize Selenium IDE; a Firefox add-on that will do straightforward record-andplayback of communications with the program. On the off chance that you need to make powerfl, program based relapse computerization and scale and disseminate scripts crosswise over numerous situations, then you need to utilize Selenium Web Driver; an accumulation of dialect particular ties to drive a program - the way it is intended to be driven. Selenium Web Driver is the successor of Selenium Remote Control which has been authoritatively censured. The Selenium Server (utilized by both Web Driver and Remote Control) likewise incorporates assembled in lattice abilities. REFRENCES [I] Martin Fowler, Kent Beck, John Brant, Refactoring: Improving the Design of Existing Code, U.S., 1999, pp. 11- 21. [2] Martin Fowler, Kent Beck, John Brant, Refactoring: Improving the Design of Existing Code, U.S., 1999, pp. 2 - 20. [3] Antawan Holmes and Marc Kellogg, Automating Functional TestsUsing Selenium, Proceedings of AGILE 2006 Conference, 2006. [4] McMahon, C, History of a Large Test Automation Project Using Selenium, 2009.8. [5] Shauvik. R. Choudhary, Dan Zhao, WATER: Web Application Test Repair, ACM, 20II. [6] Marian, Michal. Automated acceptance testing tools for Web application using Test-Driven Development. pzreglad Elektro Techniczny. 2010-9. [7] Tuomas Pajumen, Tommi Takala and Mika Katara. Model-Based Testing a General Purpose Keyword-Driven Test Automation Framework. Interational Conference on Sofware Testing. Verifcation and Validation Workshops. 2011. [8] Antawan Holmes and Marc Kellogg, Automating Functional Test Using Selenium. Proceeding of Agile Conference, 2006. [9] Chris McMahon. History of a Large Test Automation Project Using Selenium. Agile Conference. 2009. [10] Xinchun Wang, Peijie Xu, Build an Auto Testing Framework Based on Selenium and FitNesse. Interational Conference on Infrmation Technology and Computer Science. 2009. [II] Zhenghua Feng, Ju Gao, Hongwei Zeng, Research of Web Application Test Automation, Computer Engineering and Design, 2010. [12] Web Site, http://docs.seleniumhq.orgldocs/ [13] Pan Liu and Huaikou Miao, A New Approach to Generating High Quality Test Cases, 19th IEEE Asian Test Symposium, 2010, pp.71-76. [14] F.Ricca and P. Tonella. Analysis and Testing of Web Applications. In:Proc. of the Interational Sofware Engineering Conference. Toronto Canada: IEEE Computer Society Press, May 2001, 25-34. [15] Andreas Bruns, Andreas Korstadt, and Dennis Wichmann, Web Application Test With Selenium, IEEE Sofware, 2009, pp. 88-91. [16] C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576- 580,583 October 1969. [17] R. W. Floyd. Assigning meanings to programs. Proceedings of the American Mathematical Society Symposia on Applied Mathematics.Vo 2015 Interational Conference on Green Computing and Interet of Things (ICGCloT) 1383