A_Foray_Into_Cloud_Based_Software_Testing by nuhman10

VIEWS: 9 PAGES: 9

									WHITE PAPER




              A Foray Into Cloud-based
              Software Testing
                                  Sunil Joglekar
                                 Technical Architect
Abstract
Introduction
Modern Software Development entails many challenges e.g. rapidly changing business scenario,
rising complexity, shorter time to market, ensuring agility without compromising on the quality.


Agile methodology for Modern Software Development includes many practices such as automated
source code analysis for reviewing the architecture / design / code review, frequent build &
integration and automated execution of tests.


Taken together, these activities ensure rapid, immediate, useful feedback throughout the span of
software development thereby transforming a vicious circle into a virtuous cycle.


Even when we succeed in implementing the mechanisms and inculcating the best practices, there’s a
price to pay. Doing these things takes Time, Money & Resources.


Besides, we need to ensure that we create value rather than incurring costs. Cloud Computing is an
innovation we can apply to bring economy to our solution in terms of time, resources and of course,
the money!


This paper describes by means of an example our foray into cloud-based software testing using
Amazon Web Services like EC-2, S3 et al.


Audience: Test Architects, CTO, CIO


Area of Application: Testing Modern Software Systems


Benefits:
Making modern software testing economical in terms on resources, time and money


Issues and Challenges:
How to make agile practices economical.




                                                            A Foray Into Cloud-based Software Testing   02
1. Challenges in Modern Software Development
  The Modern Software Systems are growing beyond the boundaries of silo-ed enterprise
  applications to meet the requirements of rapidly changing markets. They are getting integrated
  within and across the enterprise thereby metamorphosing into ecosystems.


  This has resulted in complexity which seems to be ever increasing and also in a high number of
  changes these systems have to go through. Naturally this has lead to increased risks and
  has also increased cost of evolving these systems to meet the requirements of rapidly
  changing business landscape.


  There are pressures on time to market and there is a need to ensure the agility of the
  enterprise at several levels : Technical, Organizational and Business. The cost of finding &
  fixing defects is becoming exponential. There’s a high premium for Enduring Quality in
  Modern Software Development.




2. Testing Modern Software Systems
  The above mentioned challenges can be tackled by working in an iterative / incremental manner. We
  need to embellish the Continued Integration discipline by embedding & integrating the following
  activities :

  • Source Code Analysis

    — Common Coding Mistakes

    — Compliance to Coding Standards

    — Common Design Mistakes

    — Compliance to Design / Architectural Policies

  • Unit & Integration Testing

  • Acceptance Testing

  • Load Testing


  These activities ensure rapid, immediate, useful feedback throughout the span of software
  development thereby transforming a vicious circle into a virtuous cycle.


  Let us consider the case of modern software development using Java / JEE.


  ANT is a build tool for Java. It provides a facility to carry out tasks such as check out from the
  source code control, compiling java files, running unit tests et al. Using the build file mechanism,
  we can compose these tasks in a pipe-line manner.


                                                         A Foray Into Cloud-based Software Testing       03
We have developed an ANT pipeline using a bunch of open source tools to provide solutions to some
of the commonly recurring problems during software development as mentioned above. . Patni
Computer Systems A Foray Into Cloud-based Software Testing Page 5 of 10 Many of the available
open source tools do a pretty decent job of analyzing source code as well the byte code, jar files at al.

• Compliance to Coding Standards : CheckStyle

• Common Coding Mistakes : PMD, CPD

• Analyzing byte-code : JLint, FindBugs

• Common Design Mistakes : JDepend

• Compliance to Design / Architectural Policies : Utilities developed in-house

• Unit & integration testing : JUnit Family

• Acceptance testing : Fit/Fitnesse

• Database testing : dbFit

• Load / Performance Testing : JUnitPerf, Meter


A sample ANT pipeline would looks like the figure shown below :



            Coding Standards                                               Unit
               Violations                                               Test Report


                    Check
                                              Find-bugs                     JUnit
                    Style




    Checkout
                     CPD
                                  Create       Defect         Execute                     JMeter
     Source                        Build       Reports         Tests


              Defect Reports                                                         Performance
                                                                                     Test Report

                     PMD                         JLint                        Fit



             Standard Defects                                           Acceptance
                  Report                                                Test Report



However, this is easier said than done and even when we succeed in implementing the mechanisms
and inculcating the best practices, there’s a price to pay.




                                                                                            A Foray Into Cloud-based Software Testing   04
3. Problems with the Conventional Solution
  We need to invest in infrastructure to implement the mechanisms necessary for continued
  integration. Also, we need to set up machines for carrying out the tasks like analyzing the
  source code, running the tests et al. Naturally, this leads to up-front capital expenditure as well
  as operational expenditure.


  As the modern software systems are getting sizable, tasks like analyzing the source code and
  the large test base is implying lengthy test execution cycles !


  Under such circumstances, it would become difficult to ensure that the feedback is rapid. This
  would get in the way of ensuring the required agility and would also hamper the time to market.


  The problem can be summed up in just a line : given that doing this stuff takes Time, Money &
  Resources, how do we ensure that we create value instead of incurring costs ?


  Cloud Computing is an innovation we can apply to bring economy to our solution in terms of
  time, resources and of course, the money !




4. Amazon Cloud Computing Platform
  Cloud computing can be described as the scalable computing resources provided as a service
  from outside our environment on a pay-per-use basis.


  Amazon Cloud Computing Platform provides the following services in a quite cost effective manner.
  • Simple Storage Solution (S3)
  • Elastic Computing Cloud (EC-2)
  • Simple DB
  • Simple Queue Service (SQS)


  Simple Storage Service (S3) provides a Web services interface for the storage and retrieval of data.
  The data can be of any kind, and can be stored and accessed from anywhere across the Internet.


  Amazon Elastic Compute Cloud (EC2) makes it possible to run multiple virtual Linux servers on
  demand, providing as many computers as we need to process data or run our web application
  without having to purchase or rent physical machines.


  Once we have set up an EC2 server the way you like it, we can save it permanently as a server
  image, also called as Amazon Machine Image (AMI). We can then launch new servers from this
  image to create virtual machines that are preconfigured and ready to carry out our tasks.


  EC-2 lets us easily scale our capacity based on the demand by quickly creating virtual
  instances and terminating them once the demand is satisfied.


                                                         A Foray Into Cloud-based Software Testing       05
SimpleDB is a web service for storing, processing, and querying structured datasets. It is not a
relational database in the traditional sense, but it is a highly available schema, with a less structured
data store in the cloud, and which you can use to store and retrieve keyed values.


Simple Queue Service (SQS) provides access to the reliable messaging infrastructure used by
Amazon. You can send and retrieve messages from anywhere using simple REST-based HTTP
requests. There’s nothing to install and nothing to be configured. We can create an unlimited number
of queues, and send an unlimited number of messages.


As this is a brief overview, please refer to [1], [2] and [3] for more details. The following figure shows
how a user interacts with AWS :


                                       3. AMI is loaded
                                                                    EC2 Instance
            Amazon S3                     to an instance
                                                               (Fedora Core 4 Machine)
                   AMI
               (configured                                              SSH Client
            to run ROR app)
                                                           EC2 Environment

                                                                   EC2 Instance Firewall


                                                                                Internal IP adress
   2. Upload AMI
                                                                Network Address Allocation
      config to S3
                                                                              External IP address

                                            Internet


                                                                                4. User is given root
                                                                                   access to EC2
                            I                                                      instance using SSh
                       AM ig
                           f
                      C on                                             SSH Client

       1. User creates AMI config
          on local machine




5. Cloud-based Modern Software Testing
     Let us consider the sample ANT pipeline shown earlier as an example to understand our
     solution. We created an AMI as a foundation for the executing the following activities on the
     various instances --
     • Source Code Analysis
     • Unit / Integration Testing
     • Acceptance Testing
     • Load Testing


                                                                                                             Autonomic Computing   06
 We mapped the ANT tasks pertaining to these activities onto the Amazon EC-2 instances as
 shown below :


                                                              Source Code
                                              AMI               Analysis
                                           Instances



                                                               Unit Testing
                                              AMI
                                           Instances
         Create                                                                  Upload reports
       Instances                                                                     to S3
                                                               Acceptance
   Java & ANT                                                     Test
     based                                    AMI
                                           Instances                                    S3
      AMI



                                                              Performance
                                              AMI               Testing
                                           Instances



                                              AMI
                                           Instances




6. Benefits & Limitations
  Applying Amazon cloud computing facilities helped us accrue many benefits.

  • Reduction in Cost – Capital Expenditure (owing to zero infrastructure)

  • Reduction in Cost – Operational Expenditure (owing to a small “rent”)

  • Reduction in execution time => Rapid Feedback cycle

  • Quick Turn-around => Increase in Productivity

  • Reduction in Risk => Increase in Quality


  Our current PoC is just a baby step in the right direction. We would like to grow our prototype
  in the following directions --

  • Augment the PoC by using a blog server to blog the build process

  • Make the current prototype cloud-aware

  • Create a Cloud-based Test Lab




                                                        A Foray Into Cloud-based Software Testing   07
The following are the limitations of our PoC :

• At present Amazon does not support other platforms such as Windows, Macintosh, but only Linux
 and Open Solaris.

• Currently, we are yet to hear from commercial test tool vendors whether their tools can be deployed
 in the cloud


We believe that these issues would get resolved in the future. So, we are optimistic about applying
Cloud Computing.




7. Definitions, Abbreviation and Acronyms
     Let us consider the sample ANT pipeline shown earlier as an example to understand our
     solution. We created an AMI as a foundation for the executing the following activities on the
     various instances —
     • Source Code Analysis
     • Unit / Integration Testing

         Acronym                                         Description

          AWS                                       Amazon Web Service

           AMI                                     Amazon Machine Image

          EC-2                                   Elastic Computing Cloud

            S3                                     Simple Storage Solution




8. References
     [1] Programming Amazon Web Services by James Murty. O’Reilly Media 2008
     [2] Amazon Web Services : Articles and Tutorials
     [3] Amazon Web Services : Developer Tools – Useful AMI tools
     [4] Other Resources:
         • Wikipedia - Cloud Computing
         • NY Times - Cloud Computing: So You Don’t Have to Stand Still
         • Infoworld - What cloud computing really means
         • Brief Introduction to Cloud Computing




9. Acknowledgements
     I would like to express my sincere thanks to Dr. Prasad Ramanathan for the encouragement,
     support and feedback.


                                                                                                        Autonomic Computing   08
                                      Biography of the authors
                                       Author 1: (minimum 200 words)


                                       Sunil Joglekar is a Technical Architect with the Product & Technology Initiative Group at Patni
                                       Computer Systems.


                                       He has 18 years experience as a Software Professional working in Global Software Teams. He
                                       has spent about 5 years in United States mostly as a consultant at Sun Microsystems.


                                       Sunil has extensive experience in the development of products / product suites / product lines.
                                       Also, he is well-versed in applying the Agile Methods / Practices.


                                       Sunil specializes in architecting testable solutions for complex enterprise software systems and
                                       their integrations such as EAI / B2Bi / SOA.
REGIONAL HEADQUARTERS
                                       His primary areas of interest are : strategizing & architecting innovative solutions with Web 2.0,
AMERICAS                               Cloud Computing, Autonomic Computing et al.
United States
Patni Americas, Inc.
One Broadway
Cambridge, MA 02142.
Tel: +1 617-914-8000
Fax: +1 617-914-8200


EMEA
United Kingdom
Patni Computer Systems (UK) Ltd.
The Patni Building
264-270, Bath Road
Heathrow UB3 5JJ.
Tel: +44 20 8283 2300
Fax: +44 20 8759 9501


SAARC
India
Patni Computer Systems Ltd
Akruti, MIDC Cross Road No 21
Andheri (E), Mumbai 400 093.
Tel: +91 22 6693 0500
Fax: +91 22 6693 0211


APAC
Singapore
Patni (Singapore) Pte Ltd
61 Robinson Road
#16-02 Robinson Centre
Singapore 068893.
Tel: +65-6602-6600
Fax: +65-6602-6610


Contact: marketing@patni.com       25+ years in IT Services | 13500+ employees | SEI-CMMI Level 5 (V1.2) | P-CMM Level 3 | ISO 9001:2000

								
To top