Neil Tompson - SoftTest Ireland

23
1 “As a part of Liberty Mutual Information Systems enable Liberty Mutual Group to exceed their business objectives by delivering high value, market responsive IT solutions” Testing During The Development Phase Using Open Source Tools March 2008 Richard Thompson (Verification Technologist)

description

Visit SoftTest Ireland www.softtest.ie and sign up for access to free Irish Software Testing events.

Transcript of Neil Tompson - SoftTest Ireland

Page 1: Neil Tompson - SoftTest Ireland

1

“As a part of Liberty Mutual Information Systems enable Liberty Mutual Group to exceed their business objectives by delivering high value, market responsive IT solutions”

Testing During The Development Phase Using Open Source Tools

March 2008

Richard Thompson (Verification Technologist)

Page 2: Neil Tompson - SoftTest Ireland

2

Agenda

IntroductionWhy Open SourceExamples Through the LifecycleLessons in Implementing Open Source SuccessfullyQuestions

Page 3: Neil Tompson - SoftTest Ireland

3

Overview of Liberty-IT

Belfast based software development & testing house with ~230 staff Our parent company is Liberty Mutual Group

a leading global insurerLiberty Mutual ranks 95th on the Fortune 500 list of largest U.S. corporations (based on 2006 revenue). $85.5 billion in consolidated assets

Technologies includeJava, .Net, Struts, IBM PortalHibernate, Spring, Web Services -> SOAMultiple database platformsDedicated Testing practice focusing on technical testing solutions

Page 4: Neil Tompson - SoftTest Ireland

4

Disclaimer

The views expressed within this presentation belong solely to Richard Thompson and do not necessarily represent those of Liberty Mutual or Liberty-IT.

Page 5: Neil Tompson - SoftTest Ireland

5

Why Open Source?

Page 6: Neil Tompson - SoftTest Ireland

6

Business Demands

FasterStrategic advantage to be first to marketQuarterly -> Monthly -> Fortnightly Releases

BetterLower and lower tolerance for poor qualityExpect higher productivityDemand more visibility into project status

CheaperContinually looking to reduce costsEverything must have a ROI (Return on Investment)

Page 7: Neil Tompson - SoftTest Ireland

7

Perception of high vendors pricesGrowing number of high quality, mature open source products

Which are highly reliableHave large world wide support

More and more large companies are using Open Source tools/ components

AmazonGoogleIBMConducted by Boston-based Forrester Research Inc. in February 2004, a study revealed that 65 of the 140 companies questioned -- almost 50 percent -- are using open source applications.

Growing Role of Open Source

Page 8: Neil Tompson - SoftTest Ireland

8

Examples Through the Lifecycle

Page 9: Neil Tompson - SoftTest Ireland

9

Open Source Solutions

Unit Testing JUnit, HttpUnit, HTMLUnit, MaxQ

Automated Functional/ Regression Testing

Watir, Samie, Pamie, Jiffie

Performance Testing

OpenSTA, JMeter, WebInject, Grinder

Web Service Testing SoapUI, HttpUnit, XMLUnit

Code CoverageEmma, Cobertura

Test Management TestLink,Test Case Web

Static Analysis CheckStyle, PMD, FindMoreBugs

Continuous Integration

Cruise Control

Configuration Management

CVS, Subversion

Build Management ANT

Project Management XPlanner, dotProject

Application Monitoring

Big Brother, Nagios

Defect Tracking Mantis, Bugzilla

Page 10: Neil Tompson - SoftTest Ireland

10

RequirementsRequirements DevelopmentDevelopment

Unit/ComponentTesting

RequirementsReview & Testability

IS TestingIS Testing ProductionProduction

Performance Testing

Smoke Testing

Application Monitoring

Defect Tracking

Reports

SystemTesting

Code Review & Static Analysis

PostImplementation

Validation

Code Coverage

Business TestingBusiness Testing

Acceptance Testing

RegressionTesting

Testing Through the Lifecycle

Page 11: Neil Tompson - SoftTest Ireland

11

Automated Unit Test Reporting

JUnit• Simple framework for writing automated tests• Written in Java to test Java, so Developers only need to know 1 language• Most widely used automated unit testing framework for Java• Provides fast/ repeated feedback on quality of code

Page 12: Neil Tompson - SoftTest Ireland

12

PMD – Static Analysis

PMD scans Java source code and looks for potential problems like:•Possible bugs - empty try/catch/finally/switch statements •Dead code - unused local variables, parameters and private methods •Suboptimal code - wasteful String/StringBuffer usage •Overcomplicated expressions - unnecessary if statements, for loops that could be while loops •Duplicate code - copied/pasted code means copied/pasted bugs

Page 13: Neil Tompson - SoftTest Ireland

13

Continuous Integration Process

Code Repository

Change Request

Cruise Control Server

(Continuous Build & Test)

Build(Automated Build

Script)

Automated Unit Test

Automated Code Analysis

1. Code Coverage, 2. Static Analysis, 3.Coding Standards

Reporting DB

Developer

Page 14: Neil Tompson - SoftTest Ireland

14

Code Coverage

Page 15: Neil Tompson - SoftTest Ireland

15

Cruise Control Dashboard

Page 16: Neil Tompson - SoftTest Ireland

16

Continuous Integration – Daily builds

Page 17: Neil Tompson - SoftTest Ireland

17

Pre-commit validationEnsures that comment containsa) BUGID:b) BUGNOTE:c) TEST PLAN/DESCRIPTION

Post-commit validationWrites out the followinginformation to a DB tablea) BUGID:b) BUGNOTE:c) TEST PLAN/DESCRIPTIONd) CVS Committere) Files updated (with full path)

CVS

Comment OK

Comment InvalidDeveloper

Checks In code

MantisBugnote

CVS Check-In Process

Page 18: Neil Tompson - SoftTest Ireland

18

Watir – Browser AutomationWatir•Web Application Testing in Ruby •Watir is a toolkit used to automate browser-based tests in Internet Explorer using IE’s COM interface

Page 19: Neil Tompson - SoftTest Ireland

19

OpenSTA•Open Source alternative to LoadRunner/ Rational Performance Manager•Large community, excellent online documentation•Option to purchase guaranteed support (for a price ☺)

Performance Testing

Page 20: Neil Tompson - SoftTest Ireland

20

Lessons In Implementing Open Source Successfully

Page 21: Neil Tompson - SoftTest Ireland

21

Factors to consider when selectingMain Places to look

Sourceforge (http://sourceforge.net/ )Freshmeat (http://freshmeat.net/ )

What to look forActive communityRegular releases> 90% ActivityDocumentationDo the technologies used match those used within the company?

Perform a PilotTry on a single project, review lessons learned, move forward

Determining ROIMeasure cost to implement on project verses benefits gainedAlso factor in ongoing maintenance

ImplementationTypically requires a higher level of technical ability than Vendor solutions

Page 22: Neil Tompson - SoftTest Ireland

22

• Perform a pilot implementation and measure the setup time, learning curve & value added

• For example: Piloting Watir on a particular project resulted in:• 38% less defects identified during Business Testing

• Testing Coverage significantly increased

• Developers free to perform other activities

• Automated tests reused within Regression & Smoke Testing

• Reduction in Defects found in Production

Pilot & Measure The Value

0102030405060708090

Requirements Development Testing Production

%

MayAug

Page 23: Neil Tompson - SoftTest Ireland

23

Questions?