
Journal of Applied Science and Engineering, Vol. 21, No. 3, pp. 455-462 (2018) DOI: 10.6180/jase.201809_21(3).0017 Development of Reusable Hybrid Test Automation Framework for Web Based Scrum Projects Sulabh Tyagi1*, Ritu Sibal1, Bharti Suri2, Bimlesh Wadhwa3 and Shanuj Shekhar4 1Netaji Subhas Institute of Technology, University of Delhi, New Delhi, India 2Guru Gobind Singh Indraprastha University, New Delhi, India 3National University of Singapore, Singapore 4National Institute of Technology, Jalandhar, Punjab, India Abstract Web based applications are gaining widespread popularity and most of these applications are being developed using agile development methods mainly scrum. This invariably makes the testing of any web application necessary and important before it goes online. Agile methods advocate automated testing, which is the only way to assure faster thorough testing of any web application. In this paper, authors propose a reusable hybrid test automation framework (RHTAF) using page object model for automated testing of web applications. RHTAF combines the features of both data driven and keyword driven frameworks and developed using Selenium 2.0 tool. The primary focus of this framework is to ensure reusability and maintainability of test scripts so as to speed up the testing process of web applications. Key Words: Test Automation, Agile Software Development, Scrum, Frameworks, Web Applications 1. Introduction Our previous paper [2] reported the test script mainte- nance as one of the key challenges faced by agile practi- Testing is an integral part of any agile development tioners while practicing test automation on their projects, method and is primarily automated. Agile methods are this further leads us to develop our research questions: being embraced by primary areas of computing for soft- RQ1: How to develop a test automation framework that ware development and one of these is web engineering. can provide high reusability and maintainability According to [1] the most widely used agile methods are of test scripts? scrum and XP. Of these two, scrum follows sprint based RQ2: How to use this framework in actual agile soft- development and gives leverage to customers by provid- ware development methods like scrum? ing potentially shippable product at the end of every sprint. In order to answer these questions, it is important to To deliver a quality product at the end of every sprint establish the understanding of different test automation it is important to overcome certain challenges like short frameworks and automation tools that are prevalent in development cycles, automating daily activities like smoke software industry. testing, regression testing, continuous integration and An automation framework is defined as an overall deployment process. Furthermore, with every subsequent architecture that contains test data, test cases, test scripts, sprint, it becomes inevitable to check proper functioning test automation tool, test reporting and proper strategy to of existing functionalities. Automated testing assures execute the testing problem. Automation frameworks are thorough testing in spite of tight deliverable schedules. broadly of three types, namely: 1. Data Driven Framework - It is primarily used for exe- *Corresponding author. E-mail: [email protected] cuting set of test steps with multiple sets of data [3]. In 456 Sulabh Tyagi et al. this framework, set of test input is read from data files The rest of this paper is structured as follows: next like CSV files, Excel files, ADO objects, etc. and are section briefs about background; the third section de- loaded into variables in captured or manually coded scribes the implementation and experimental analysis of script. this study; the fourth section presented the results; and 2. Keyword Driven Framework - In this framework each the last section concludes the paper. test step of every test case is associated with a key- word. Keywords are stored in excel file and driver 2. Background script reads them to perform user actions. 3. Hybrid Framework - It is a combination of both data Today most of the software industries are migrating driven and keyword automation framework. This from bulkier development methods to lightweight agile frameworks stores keyword for each test case step and methods. In agile methods automation testing strategies at the same time test data can also be read from excel are followed in order to improve quality of the product, files to run multiple sets of data. reduce cycle time and for optimal utilization of man- Many test automation tools are available in the mar- power [5]. According to [6], technical debt accumulates ket today like QTP (quick test functional) test complete if development team opts shortcut approach, hacks in and selenium. We used selenium tool to implement RHTAF quick fixes, skips writing automating test and eventually and reasons to prefer selenium over other tools are; firstly, code base gets harder and harder to maintain and this selenium is open source tool and cannot levy any license leads to the higher maintenance cost and lower team ve- fee. Secondly, selenium gives leverage to automate web locity. Tyagi et al. [2] reported the use of test automation applications with multiple programming language sup- frameworks in solving the test script maintenance prob- port like Java, C# and Python. Recently, Selenium RC lem for agile software development projects. Moreover, and Web Driver are merged to form Selenium 2.0 which other studies [7,8] also depicted the importance of han- offers many advantages like direct communication with dling the test script maintenance and effective test auto- the browser, Simple API’s without any redundancy and mation. Rafi et al. [9] discussed the superiority and ben- easy architecture [3]. Selenium 2.0 supports multiple efits of test automation when several regression rounds web browsers like Chrome, Firefox, Internet Explorer are needed. and Safari [4]. In study by Puleio’s [10] test automation was seen as In this paper, we propose a hybrid automation frame- a key factor in agile testing to keep development and work with Selenium 2.0 using Page Object Model (POM). testing in synchronization. Test automation is of prime Normally, any web application comprises of multiple importance in agile projects, continuous testing would web pages and each webpage has a different set of ob- have been impossible without test automation. Hui et al. jects also know as UI elements to interact with. More- [11] argued that keyword driven automated testing frame- over, most of the time a single UI element is being used work has better reusability than recording/playback and in multiple test cases sometimes as many as twenty or data driver frameworks and presented keyword driven thirty odd test cases so if that UI element undergoes any distributed framework for Linux platform. In [12] au- change than one has to traverse these twenty or thirty odd thors presented extension of selenium RC tool to per- test cases to update that change. By using POM, change form automated database testing in web applications. has to be made under that particular page object class containing the reusable method for that particular UI ele- 3. Proposed Framework ment and all the test cases need to call that reusable me- thod of that particular POM class. Hence, a page object In this paper, we propose a reusable hybrid test auto- model simply models the objects within the test code. mation framework using page object model. Use of page This reduces the amount of duplicated code and thus, if object model in designing this hybrid test automation the UI changes frequently, the fix needs only to be ap- framework makes it unique. The need of continuous de- plied at one place. livery of features and change requests with every subse- Development of Reusable Hybrid Test Automation Framework for Web Based Scrum Projects 457 quent sprint in an agile development project makes it test cases execution report in the prescribed format for prone to higher maintenance costs and development time, the analysis. We used extent report plug-in to generate hence without in place test automation framework it is the reports for every executed test case. very difficult to cope up with such challenges. Our test Layer 3 - It comprises of input data files in .xls for- automaton framework which is based on POM would in- mat containing test data for each test scenario that is herently make script maintenance easier and also makes one column containing all the reusable keywords for test execution simpler and faster. Eclipse IDE is used to each web page of our application under test and other develop RHTAF using Selenium 2.0. Eclipse is preferred column is for the data driven framework mainly in the over Visual Studio due to many reasons like eclipse is form of excel file as shown in Figure 2. Our framework open source IDE, test script creation and test execution is also has the screenshots functionality which captures also fast and easy in eclipse IDE. the screenshot in case of failed test case to record any error or warning messages during execution of the test 3.1 Three Layer Architecture of Proposed script. Reusable Hybrid Automation Framework We implemented reusable hybrid test automation 3.2 Implementation and Experimental Analysis of framework using three layered architecture as shown in RHTAF in Scrum Environment Figure 1 below. The implementation of our reusable hybrid test auto- Layer 1 - It comprised of Application Under Test (AUT) that could
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-