GridUnit: Using the Computational Grid to Speed up Software Testing

Similar documents
Labs of the World, Unite!!!

Peer-to-peer grid computing with the OurGrid Community

A Framework for Automated Software Testing on the Cloud

Scalable Hybrid Search on Distributed Databases

Laboratório de Sistemas Distribuídos, Universidade Federal de Campina Grande. {zflavio, Eliane Araújo

A Grid-Enabled Component Container for CORBA Lightweight Components

Description of a Lightweight Bartering Grid Architecture

Analysis of the Test Driven Development by Example

Pearson Education 2007 Chapter 9 (RASD 3/e)

Practical Objects: Test Driven Software Development using JUnit

GerpavGrid: using the Grid to maintain the city road system

An Evaluation of Alternative Designs for a Grid Information Service

Chapter 9 Quality and Change Management

An Introduction to the Grid

A Case Study on the Similarity Between Source Code and Bug Reports Vocabularies

A Resource Discovery Algorithm in Mobile Grid Computing Based on IP-Paging Scheme

First Steps Towards Conceptual Schema Testing

HETEROGENEOUS COMPUTING

Object Oriented Software Design - I

2014 Intelliware Development Inc.

GRID COMPUTING BASED MODEL FOR REMOTE MONITORING OF ENERGY FLOW AND PREDICTION OF HT LINE LOSS IN POWER DISTRIBUTION SYSTEM

San Jose State University - Department of Computer Science

Automating Regression Testing of Java Programs the JSnoopy Way

Tuesday, November 15. Testing

Credit where Credit is Due. Goals for this Lecture. Introduction to Design

Program Correctness and Efficiency. Chapter 2

Performance Evaluation of A Testing Framework using QuickCheck and Hadoop

ANALYSIS OF PERFORMANCE BOTTLENECK OF P2P GRID APPLICATIONS

Chapter 14 Software Testing Techniques

Distributed Testing with SmartFrog

Partial Acquisition Prashant Jain and Michael Kircher

Lightweight Service-oriented Grid Application Toolkit *

Introduction to Grid Computing

Introduction. Software Trends. Topics for Discussion. Grid Technology. GridForce:

A Compact Computing Environment For A Windows PC Cluster Towards Seamless Molecular Dynamics Simulations

Pearson Education 2005 Chapter 9 (Maciaszek - RASD 2/e) 2

THE VEGA PERSONAL GRID: A LIGHTWEIGHT GRID ARCHITECTURE

Agile Manifesto & XP. Topics. Rapid software development. Agile methods. Chapter ) What is Agile trying to do?

A distributed computation of Interpro Pfam, PROSITE and ProDom for protein annotation

Performance Monitoring of Energy Flow in the Power Transmission and Distribution System Using Grid Computing

Testing in the Agile World

Infrastructure for Autonomous Mobile Robots Communication and Coordination

TEST DRIVEN DEVELOPMENT

Automated Acceptance Testing

Supporting service management data composition in grid environments

Efficient Regression Test Model for Object Oriented Software

Testing Grid Application Workflows Using TTCN-3

Hierarchical Replication Control

The TDAQ Analytics Dashboard: a real-time web application for the ATLAS TDAQ control infrastructure

2. Reasons for implementing clos-unit

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1,2 and 3, Spring 2017

System Integration and Build Management

Application of UniTESK Technology for Functional Testing of Infrastructural Grid Software

An Experience in Accessing Grid Computing from Mobile Device with GridLab Mobile Services

So, You Want to Test Your Compiler?

Visual Modeler for Grid Modeling and Simulation (GridSim) Toolkit

To the Cloud and Back: A Distributed Photo Processing Pipeline

ADAPTIVE AND DYNAMIC LOAD BALANCING METHODOLOGIES FOR DISTRIBUTED ENVIRONMENT

A grid representation for Distributed Virtual Environments

Unit 1 Introduction to Software Engineering

Functional Testing with Open Source Software. Quest Chris Kaufman April 2009

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY

How to implement NIST Cybersecurity Framework using ISO WHITE PAPER. Copyright 2017 Advisera Expert Solutions Ltd. All rights reserved.

An Active Resource Management System for Computational Grid*

THEBES: THE GRID MIDDLEWARE PROJECT Project Overview, Status Report and Roadmap

Universal Communication Component on Symbian Series60 Platform

Oracle and Tangosol Acquisition Announcement

Hospital System Lowers IT Costs After Epic Migration Flatirons Digital Innovations, Inc. All rights reserved.

A Cloud Framework for Big Data Analytics Workflows on Azure

ARMSim: A Modeling and Simulation Environment for Agent-Based Grid Computing

Simulation of a cost model response requests for replication in data grid environment

EECS 4313 Software Engineering Testing

Testing in Agile Software Development

Utilizing Fast Testing to Transform Java Development into an Agile, Quick Release, Low Risk Process

Grid Architectural Models

GUI framework communication via the WWW

Automated Testing of Tableau Dashboards

On Supporting Disconnected Operation in Grid Computing

Quality of Service Aspects and Metrics in Grid Computing

Assignment 5. Georgia Koloniari

IPv6 Deployment in Africa

SonarJ White Paper. Sonar stands for Software and Architecture. It is meant to support software developers and architects in their daily work.

xtreme Programming (summary of Kent Beck s XP book) Stefan Resmerita, WS2015

Unit Testing with JUnit and CppUnit

Software Testing Lecture 1. Justin Pearson

Enterprise Data Architecture: Why, What and How

DISTRIBUTED DESIGN OF PRODUCT ORIENTED MANUFACTURING SYSTEMS

Web-based access to the grid using. the Grid Resource Broker Portal

An Architecture For Computational Grids Based On Proxy Servers

TEST FRAMEWORKS FOR ELUSIVE BUG TESTING

Grid Computing. Grid Computing 2

Irbid National University, Irbid, Jordan. 1. The concept of distributed corporate systems

PARALLEL PROGRAM EXECUTION SUPPORT IN THE JGRID SYSTEM

The Grid Authentication System for Mobile Grid Environment

Software Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore

g-eclipse A Contextualised Framework for Grid Users, Grid Resource Providers and Grid Application Developers

WSRF Services for Composing Distributed Data Mining Applications on Grids: Functionality and Performance

Managing intranets: opportunities and challenges

Visual Construction of Multi-Agent-Systems according to the AgentComponent Approach and the Run-Design-Time Concept

Introduction to GSI. SNIA Green Storage Overview

Transcription:

GridUnit: Using the Computational Grid to Speed up Software Testing Alexandre Nóbrega Duarte, Walfredo Cirne, Francisco Brasileiro, Patricia Duarte de Lima Machado Departamento de Sistemas e Computação Universidade Federal de Campina Grande Avenida Aprígio Veloso, s/n. Bodocongó, CEP 58.109-970 Campina Grande PB Brazil {alex, walfredo, fubica, patricia}@dsc.ufcg.edu.br Abstract. Software testing practices can improve software reliability. This is a fact that the long history of disasters caused by poorly tested software should not allow us to forget. However, as software grows, its test suite becomes larger and its execution time may become a problem to software developers. This is especially stronger for agile methodologies, which preach a short develop/test cycle. Moreover, due to the increasing complexity of systems, it is not enough to test software only in the development environment. We need to test the software in a variety of environments. In this paper we investigate how the Grid can help with both problems and present a framework to use the intrinsic characteristics of the Grid to speed up the software testing process. 1. Introduction Software testing practices can improve software reliability. For instance, Ben-Ari discusses how a poorly tested software could brought down a rocket, costing hundreds of millions of dollars and delaying the European Space Agency space program by a year (Ben-Ari, 1999). Other examples of disasters caused by untested software are also showed in (Mellor, 1994). A test suite that catches the expected behavior of the software can be used to check if its implementation works as it is supposed to. Furthermore, when a software defect is fixed, the test suite can be used to check whether the modification has collateral effects in other parts of the software. Large software projects usually involve several development teams. In these situations, a test suite can be used by a development team to check if a software module provided by another team has an intended behavior, hiding the implementation details (Jeffries, Anderson and Hendrickson, 2000). This way, large software projects usually have large test suites. There are industry reports showing that a complete regression test session of a 20.000 lines software could take as much as seven weeks of continuous execution (Rothermel, Untch and Chu, 2001). In order to be effective, the software testing process should be carried out in an automatic and fast way. It should be automatic because the same test suite must be executed many times along the software life cycle, including every time a new functionality is added and every time a software defect is fixed. Additionally, a test suite that executes fast can be executed more frequently during the development process, catching problems sooner. Another issue that must be dealt with when testing a software is environment heterogeneity. Although software components may be exhaustively tested in the

development environment before going into production, we believe that the ability to run tests in a variety of environments can be very useful. This is because the environment and its configuration change from development to production environments. In fact, due to the complexity of systems, nowadays, each environment is unique. Therefore, running the tests in a heterogeneous production-like environment allows for finding configuration errors as well as software defects that were not detected while the software was tested within the homogeneous development environment. There are well established solutions (Gamma and Back, 1999) (The Open Group, 2003) to automate the software testing process. There are also a few efforts (Kapfhammer, 2001) (Hughes, Greenwood and Coulson, 2004) (SpiritSoft, 2005) to speed up the software testing process by distributing the execution over a set of processors. But, to the best of our knowledge, nobody has explored the unique characteristics of the Computational Grids (Foster and Kesselman, 2004) (Berman, Fox and Hey, 2003) yet, such as its massive parallelism and huge heterogeneity, to improve software testability. In this paper we investigate the use of the Grid as a testing environment and present an open source solution to execute automated software tests in the Grid. Our solution is an extension of the widely adopted JUnit (Gamma and Back, 1999) testing framework and is able to distribute the execution of a JUnit TestSuite in the Grid without requiring any source code modification. We start by presenting, in Section 2, the Grid as a test environment. Then, in Section 3, we present the GridUnit, downloadable from http://gridunit.sourceforge.net, and also some preliminary performance evaluation of its utilization. Finally, in Section 4, we conclude the paper with our final remarks and proposals for future work. 2. The Grid as a Test Environment The Grid is the computing and data management infrastructure that will provide the electronic underpinning for a global society in business, government, research, science and entertainment (Berman, Fox and Hey, 2003). Grids have the potential to revolutionize computing by providing ubiquitous, on demand access to computational services and resources, provided by multiple independent sources. Grids can also provide unprecedented levels of parallelism for high-performance applications. These possibilities create fertile ground for entirely new applications, much more ubiquitous and adaptive, maybe with huge computational and storage requirements. Grid software is highly complex distributed software however, we reach a conclusion that seems to be, at first, contradictory: The same caracteristics that make Grid software a very complex piece of code make the Grid an excelent test environment. The very high levels of paralelism provided by a Grid can speed up the test execution, increasing productivity and making the testing process of large software a less expensive task. The Grid can also lower the costs of acquisition and maintenance of the test environment. For instance, a large company, with several software factories distributed over the world, working on different time zones, can use the Grid to share its idle resources among its factories. By creating an enterprise Grid, a company does not need to buy additional machines to improve test speed and, therefore, does not need to spend more money with new hardware and new software maintenance. Additionaly, as the. Grid is a highly heterogeneous environment, the software can be tested using varied software and hardware configurations, bringing the software test process closer to the

software production environment. This can minimize test result contamination by specific development configurations. Moreover, the Grid can provide resource virtualizations for its nodes, creating empty and well defined environments for the execution of the user tasks. This bounded environment impedes that the execution of test t i alters the normal outcome of test t j. 3. The GridUnit Framework The GridUnit framework is an extension of the widely adopted JUnit testing framework (Gamma and Beck, 1999) able to run JUnit test suites in a Grid with minimum user intervention. Its main functionalities were pointed by (Kapfhammer, 2001) as important aspects that a test distribution tool must consider in order to improve the costeffectiveness of the testing process. 1. Transparent and Automatic Distribution: The GridUnit considers each JUnit test as an independent task, scheduling its execution in the Grid without any user intervention. Moreover, GridUnit does not require any modification in the application source code; 2. Test Case Contamination Avoidance: Each test is executed using the resource virtualization provided by the Grid, and, as explained in Section 2, this impedes that the execution of test t i alters the normal outcome of a test t j ; 3. Test Load Distribution: The GridUnit relies on the Grid broker scheduler to provide load distribution; 4. Test Suite Integrity: The default JUnit test runner runs each unit test as an independent task. For each test, it creates an instance of the test class, calls the setup() method, calls the testmethod(), calls the teardown() method and then destroys the instance. The GridUnit reproduces the same behavior with the difference that each test can be executed in a different location in the Grid; 5. Test Execution Control: The GridTestRunner and GridTestListener interfaces provide a mechanism to build a centralized test execution and monitoring point. The GridUnit graphical user interface provides controls to start and stop the execution of the tests of a given test suite. It also monitors the execution of the tests and presents the result of the execution of each test as soon as it is available. Figure 1 shows the high level architecture of the GridUnit framework. Figure 1: The GridUnit high level architecture

The framework is composed by four entities: GridTestSuite, GridTestRunner, GridTestListener and GridTester. The GridTestSuite is an extension of the JUnit TestSuite and provides a way to specify which tests should be executed in the Grid. GridTestRunner is a Java interface that represents an entity able to coordinate the execution of the tests in the Grid. GridTester is a Java class that uses the JUnit framework to execute one TestCase in a Grid node. The GridTestRunner sends each of the TestCases (and all files needed to execute the test) in a GridTestSuite to a Grid node and uses a GridTester to run it and to collect the results of the execution. GridTestListener is a Java interface that should be implemented by each class that wants to monitor the execution of the tests. The only Grid-dependent part of the GridUnit framework is the GridTestRunner. So it needs to be specialized in order to provide support to specific Grid software and middleware, like Globus (The Globus Alliance, 2005), OurGrid (Cirne et al, 2005) or Condor (Thain, Tannenbaum, and Livny, 2004). In addition to the core framework, we created the graphical user interface (GUI) showed in Figure 2 to provide a centralized user friendly way to run and to monitor the execution of JUnit tests on the Grid. It implements the GridTestListener interface in order to receive information about the status of the execution of the tests on the grid. The input for the GridUnit GUI is a JUnit TestSuite containing all tests that should be executed in the Grid. Like the JUnit TestRunners, the tool must be executed inside the directory where all files used by the tests are located. This is necessary because GridUnit need to copy the application directory to the remote Grid node prior to the execution of each test. Figure 2: The GridUnit graphical user interface Figure 2 shows an example of the execution of a test suite in a Grid. In this example, the GridTestSuite has 250 TestCases. The status bar, in the lower corner of the window, shows that at that moment 6% (or 15) of the 250 TestCases were executed, five of them failed due to unsatisfied assertions and five of them failed due to unanticipated errors. The progress bar is gray because there are tests that failed due to unanticipated errors, indicating that some tests could not be executed. It would be red if all failed tests failed due to unsatisfied assertions and green if no tests failed at all.

The tree at the left corner represents the test hierarchy and shows the status of the execution of the tests using colored icons. It provides an overview of the execution process. For detailed information the user can look at the Failures and the Errors tabs. The Execution Trace tab provides an event driven log of the test execution. The user can, at any time, save the contents of each tab to a file for posterior analysis. 3.2 Preliminary Results In order to validate the GridUnit framework we have instantiated it to run tests in a real Grid environment. We decided to start using the OurGrid (Cirne et al, 2005) toolkit based on our knowledge and past experiences with the solution and in the fact that the OurGrid is a free-to-join Grid, so we could start to use it immediately, without previous access negotiations. To do so, we have implemented the MyGridTestRunner. The MyGridTestRunner is able to convert a JUnit TestSuite into a set of Grid tasks and jobs that can be executed using the OurGrid toolkit. Note that the graphical user interface could be used to run tests over any kind of Grid, given that there is an appropriate GridTestRunner available. We have created also the LocalTestRunner that simulates the behavior of JUnit, running all tests in the local machine. So the GridUnit GUI can also be used as a replacement for the JUnit graphical test runners. We have created a synthetic application, with 250 TestCases, and compared the execution time of the tests using JUnit and using GridUnit with some different Grid configurations. The chart in Figure 3 shows the results of the experiments. 12,00 GridUnit Speedup 10,00 Speedup 8,00 6,00 4,00 2,00 0,00 0 10 20 30 40 Grid Size Figure 3: GridUnit performance evaluation In the chart, the X axis represents the number of machines used to run a test suite during one execution of the experiment while the Y axis shows the speed up obtained by using GridUnit instead of JUnit. As we can see the GridUnit provided a speedup of almost 12x over JUnit when using a grid with 45 machines. Due to some network instability observed during the experiments, there were some unexpected results, like a speedup of only 3x using a grid with 30 machines. 4. Conclusions and Future Work In this paper we showed that the computational power provided by Computational Grids can be used to parallelize the execution of the tests, speeding up the overall process. 50

Additionally, we discussed how the Grid can bring the software testing process a step closer to the software production environment. We created an open source Java-based framework, called GridUnit, able to distribute the execution of a JUnit test suite over a Grid without requiring any change in the application source code, providing a cost-effective improvement to the testing processes. We showed how the framework addresses the five considerations pointed by (Kapfhammer, 2001) as key aspects to build a reliable test distribution mechanism. The framework was validated by using OurGrid (Cirne et al, 2005) as the Grid environment to run the tests of a synthetic application. There is much room for future work. First, we need to use GridUnit to test some real applications in a Grid and characterize how the heterogeneity of the Grid could help find defects in the software. Next, it is important to study the relation between test granularities and file transmission delays measuring the network overhead introduced by the Grid. Finally we want to study how the use of the Grid as a software environment can improve the quality of Grid software itself. Acknowledges This work has been partially developed in collaboration with HP Brazil R&D. Authors would also like to thank the financial support from CNPq/Brazil. References M. Ben-Ari. The bug that destroyed a rocket. Journal of Computer Science Education, 13(2):15 16, 1999. P. Mellor, CAD: Computer-Aided Disaster, High. Integr. Syst., 1(2):101-156, 1994. F. Berman, G. Fox, A. J. G. Hey, Grid Computing: Making the Global Infrastructure a Reality, (John Wiley & Sons Inc., 2003). W. Cirne, F. Brasileiro, N. Andrade, R. Santos, A. Andrade, R. Novaes and M. Mowbray, Labs of the World, Unite!!!, Submitted for publication in May 2005. http://www.ourgrid.org/twiki-public/bin/view/ourgrid/ourpublications D. Thain, T. Tannenbaum, and M. Livny., Distributed Computing in Practice: The Condor Experience, Concurrency and Computation: Practice and Experience, 17(2):323-356, 2004. E. Gamma, K. Beck. JUnit: A cook's tour. Java Report, 4(5):27-38, May 1999 R. E. Jeffries, A. Anderson and C. Hendrickson, Extreme Programming Installed. (Addison-Wesley, 2000). G. M. Kapfhammer, Automatically and Transparently Distributing the Execution of Regression Test Suites, in: Proceedings of the 18th International Conference on Testing Computer Software, 2001. G. Rothermel, R. H. Untch and C. Chu. Prioritizing test cases for regression testing, IEEE Transactions on Software Engineering, 27(10):929-948, 2001. D. Hughes, P. Greenwood,G. Coulson. A Framework for Testing Distributed Systems. in: Proceedings of the 4th IEEE International Conference on Peer-to-Peer computing (P2P 04), 2004. I. Foster and C. Kesselman. The Grid: Blueprint for a New Computing Infrastructure, 2nd Ed, Morgan Kaufmann, 2004. SpiritSoft, SysUnit, http://sysunit.org, 2005. The Globus Alliance, Globus, http://www.globus.org, 2005. The Open Group, TETware, http://tetworks.opengroup.org, 2005.