Copyright © 2005 QA Insight, Inc. All rights reserved. 1 A Review of Software Inspection Techniques Getting Higher Returns from Your Review Processes Karina.

Slides:



Advertisements
Similar presentations
Damian Gordon.  Static Testing is the testing of a component or system at a specification or implementation level without execution of the software.
Advertisements

Chapter 4 Quality Assurance in Context
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #7 Software Engineering.
Static Technique. Static Technique - Review  A way of testing software work products  Program code, requirement spec., design spec.  Test plan, test.
Inspection (c) 2007 Mauro Pezzè & Michal Young Ch 18, slide 1 Photo credit jurvetson on Flickr.com; creative commons attribution license.
Testing Without Executing the Code Pavlina Koleva Junior QA Engineer WinCore Telerik QA Academy Telerik QA Academy.
 Every stage from phase DESIGN in Software Development Process will have “design document” especially in analysis and design phases.  “Design document”
SOFTWARE QUALITY ASSURANCE Maltepe University Faculty of Engineering SE 410.
Soft. Eng. II, Spr. 02Dr Driss Kettani, from I. Sommerville1 CSC-3325: Chapter 6 Title : The Software Quality Reading: I. Sommerville, Chap: 24.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Fall, 2006SW Eng Standalone Progs, Univ of Colorado Boulder 1 Wk 11 Glass Box Testing, Flow Graphs, Test Coverage SW Engineering of Standalone Programs.
SE 450 Software Processes & Product Metrics 1 Defect Removal.
Applied Software Project Management Andrew Stellman & Jennifer Greene Applied Software Project Management Applied Software.
SE 555 Software Requirements & Specification Requirements Validation.
Testing an individual module
CSC 395 – Software Engineering Lecture 9: Testing -or- How I Stopped Worrying and Learned to Love the Bug.
Verification and Validation
1 Software Inspections and Walkthroughs Author: A. Frank Ackerman Presented by Cynthia Johnson EEL6883.
Examining the Code [Reading assignment: Chapter 6, pp ]
Design Reviews Peer Reviews. Agenda Peer Reviews Participants of Peer Review Preparation for a Peer Review Session The Peer Review Session Post-peer Review.
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
OHT 4.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Software Quality assurance (SQA) SWE 333 Dr Khalid Alnafjan
Chapter 24 - Quality Management Lecture 1 1Chapter 24 Quality management.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 27 Slide 1 Quality Management 1.
Software Quality Chapter Software Quality  How can you tell if software has high quality?  How can we measure the quality of software?  How.
Software Inspections and Walkthroughs By. Adnan khan.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
SoITSSpecifications of IT systems? 1 Specifications of IT systems checking and validating Jens Bennedsen and Peter Gorm Larsen
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
Chapter 14: Inspection  Basic Concept and Generic Process  Fagan Inspection  Other Inspection and Related Activities.
Lecture 16 Formal Technical Reviews (FTRs) (also know as inspections) FOR0383 Software Quality Assurance 9/19/20151Dr Andy Brooks Don´t review in your.
Software Inspection A basic tool for defect removal A basic tool for defect removal Urgent need for QA and removal can be supported by inspection Urgent.
Formal and Informal Peer Reviews
Phil Cronin Anne Hill Allen Schones CIS841 Summer on Campus 1998 IN-PROCESS INSPECTIONS FOR OBJECT ORIENTED DESIGNS.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation Slightly adapted by Anders Børjesson.
This chapter is extracted from Sommerville’s slides. Text book chapter
Disciplined Software Engineering Lecture #7 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Benefiting from Code Inspections Kevin W. Wall Copyright © – Kevin W. Wall – Some Rights Reserved. This work is made available and licensed.
Formal Technical Reviews Matt Graham 18 November 2004 EECS 814 University of Kansas.
Use of Coverity & Valgrind in Geant4 Gabriele Cosmo.
Jump to first page (C) 1998, Arun Lakhotia 1 Quality Assurance: Reviews and Walkthroughs Arun Lakhotia University of Southwestern Louisiana Po Box
CHAPTER 9 INSPECTIONS AS AN UP-FRONT QUALITY TECHNIQUE
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 7 1 Design and Code Reviews - Overview What are design and code.
Software Testing and Maintenance 1 Code Review  Introduction  How to Conduct Code Review  Practical Tips  Tool Support  Summary.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
1 Chapter 3 1.Quality Management, 2.Software Cost Estimation 3.Process Improvement.
1 TenStep Project Management Process ™ PM00.9 PM00.9 Project Management Preparation for Success * Manage Quality *
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Code Reviews James Walden Northern Kentucky University.
Unit III Static Testing. static testing Testing of a component or system at requirements or implementation level without execution of any software, e.g.,
© Michael Crosby and Charles Sacker, 2001 Systematic Software Reviews Software reviews are a “quality improvement process for written material”.
Advances In Software Inspection
Testing and Debugging. Testing Fundamentals  Test as you develop Easier to find bugs early rather than later Prototyping helps identify problems early.
Software Engineering 2 Term Project by: Feras Batarseh Nestor Rivera.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Software inspections l Involve people examining the source representation with.
Software Project Management Lecture # 12. Outline Quality Management ( chapter 26 - Pressman )  SQA  Who does it?  SQA Activities  Software reviews.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
CSC 480 Software Engineering
Verification and Validation
Verification and Validation
Verification and Validation
Chapter 14: Inspection Basic Concept and Generic Process
Chapter 13 Quality Management
CS240: Advanced Programming Concepts
Applied Software Project Management
QA Reviews Lecture # 6.
Testing and Inspection Present and Future
Testing, Inspection, Walkthrough
Presentation transcript:

Copyright © 2005 QA Insight, Inc. All rights reserved. 1 A Review of Software Inspection Techniques Getting Higher Returns from Your Review Processes Karina Gamble, QA Insight, Inc Presented For SCQAA Inland Empire Chapter January 12, 2006

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Agenda  Introduction  Review Types – similarities and differences  Benefits of software inspections/reviews  Reasons for not establishing company-wide review processes  Recommendations and solutions

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Introductions  Founder of QA Insight, Inc.  Specialties: establishing processes, testing, training and mentoring – soon to launch eMentoring  Co-founder of the San Fernando Valley chapter of SCQAA serving the northern LA county  Our SCQAA overall objective  to provide educational talks educating people in various roles or job functions – Testers, PMs, BAs, and yes even developers towards achieving a common goal  Improve Software Product Quality

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Static Analysis  Static vs. dynamic  Static means visual examination not examination by execution  Static analysis is sometimes improperly termed as static testing based on:  IEEE std. Glossary  Static analysis does not have to be 100% manual, in fact you need to use tools to help (not replace) your analysis process

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Static Analysis Types Inspections Peer Reviews Passarounds /Deskchecks Walkthroughs Ad Hoc Reviews Pair* Programming Most Formal Least Formal Can be considered as an informal review type but more of a s/w development style (by Karl E. Weigers)

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Fagan’s Inspection Process Moderator  Planning  Overview  Preparation  Meeting  Rework  Follow-up Inspectors  Overview  Preparation  Meeting  Follow-up Author  Overview  Meeting  Rework  Follow-up Reader  Overview  Meeting  Follow-up Recorder  Scribe  Defect entry

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Inspections  Most formal – same as formal inspection  Developed by Fagan - IBM in 1976  Multiple roles in the review team:  Moderator, Inspector(s), Author, Reader, Recorder  Several sequential activities  Author is not the moderator and does not lead the meeting  Reader goes over small chunks of work product at a time in the meeting

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Peer Reviews  Less formal but still planned  Participants still get materials to review before the meeting  No overview or follow-up meetings  Author may lead the meeting (unlike inspections)  Not as efficient in finding defects as inspections are  Bigger chunks are reviewed

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Walkthroughs  Informal review meeting led by the author  Primarily used for education and soliciting feedback  Error detection happens during the meeting not during preparation phase  Participants are not expected to be familiar with code or design, or any other item under review  Level of detail reviewed is up to author’s discretion

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Passarounds  Informal review  Good way to start a review culture  Find people in your team that you respect and trust to review  Distributing product to review to multiple people at the same time  No meeting is held – just independent review  Each reviewer gets to see the comments of others to minimize redundancy  Can end up with very hot debates – Be careful!

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Yet Another Famous Cost of Defects Slide!

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Benefits of Inspections over Testing  Inspections are better in finding defects than just testing  Symptoms of problems instead of problems  Testing alone cannot tell you how maintainable or clear the code is

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Benefits of Code Inspections  Numerous studies have shown the benefits of static analysis  HP’s inspection program measured an ROI of 10 to 1  Inspection reduced the cost of finding error by factor of 10 at AT & T Bell labs.  Studies have shown the benefits of code inspections  65% errors found from Fagan’s inspections  35% errors found from tests  3.25 errors/unit effort of inspection  0.44 errors/unit effort of testing  Fagan inspections are 7.4 times more productive than testing! ( Note: You can use defects founds in inspections to predict defects remaining)

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Benefits of Inspections for Testers  “Testers can spend more of their time finding more subtle bugs Instead of finding bugs that developers should have found or better yet, should have prevented from introducing into code/design to begin with.”

Copyright © 2005 QA Insight, Inc. All rights reserved. 15 So Why Doesn’t Every software group do Inspections? Who Does Software Inspections???

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Reasons  General lack of knowledge about reviews  Not enough training  Cultural inhibitors (attitudes and past experiences)  Improper planning  Improper use of review metrics

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Why are Code Inspections often not being done?  Very time consuming  Code is too complex  Reviewers are usually not prepared  Manual inspection of OO programs is not easy  It is a manual process that you need to rely on the expertise and experience of your reviewers  Inconsistent results  Limited on how much code you can inspect

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Our Challenges  QA teams tend to focus more on testing - not by choice sometimes  Difficult to break territorial and cultural barriers  Management does not see the benefits, so no support for reviews and inspections  Lack of knowledge and tools  Myths and misconceptions – Management by opinions rather than by facts – no metrics  Status-quo vs. real positive changes

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. So What do we do now?  Training! Training! Training!  QA managers justify reviews to your organizations  QA managers define and document inspection/review processes in the QA plan  Collect review metrics  Summarize defect data and report  QA along with the DEV team to communicate the benefits  Do root cause analysis

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Tools and Techniques  Static analysis tools and reading techniques  Static Analysis tools:  To save time during code inspections and increase productivity run a code checker tool first – check for violations against standards, memory leaks, unhandled exception  These tools still don’t replace manual inspections  Reading Techniques are very useful for reviewing requirements  Helps reviewers find more defects efficiently

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Static Analysis Tools  Automate some of the manual checking  Coding standards  Memory leaks  Uncaught runtime exceptions  Race conditions – different threads accessing the same variable  Deadlock conditions  Security vulnerabilities  Example tools: Jtest, Jlint, PMD

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Static Analysis with JTest by Parasoft  Checks for 380 coding standards and automatically corrects the rule violations  Checks for a specific comment structure format validating the comment matches with the code – JContract  Automates unit testing – Black box testing at the unit (class) level

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Static Analysis with Jlint  Jlint will check your Java code and find bugs, inconsistencies and synchronization problems by doing data flow analysis and building the lock graph.  Finds unreachable code  Threading/lock problems  More than just coding standard checking  Find bugs that even manual inspections can’t find – not even by experienced staff!  Jlint is extremely fast

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Static Analysis with PMD  PMD scans Java source code and looks for potential problems like:  Empty try/catch/finally/switch blocks  Unused local variables, parameters and private methods  Empty if/while statements  Overcomplicated expressions - unnecessary if statements, for loops that could be while loops  Classes with high Cyclomatic Complexity measurements

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Reading Techniques  Formal software inspections (e.g. Fagan’s)  Focus on structure, frequency of meetings  Organizational aspects  Not on technical aspects – how to review  Use Ad hoc reading techniques  Reading techniques  Optimize inspections – find most defects with less efforts  Tackle the technical aspects  Provide a structured process to help the groups improve their review process  Can help you find out what defects passed thru the process and what to do to improve the process

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Reading Techniques  Ad Hoc  No structure in place  Everyone attempts to look for all classes of defects  Checklist-based  Set of questions under each review category  One checklist by all inspectors  Scenario-based /Perspective-based – each reviewer gets to review artifact based on his/her own role or based on specific set of usage scenarios

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Scenario/Perspective Based  Each reviewer assumes a specific perspective – e.g. tester, designer and customer, maintainer, etc.  Reviewers are also required to produce a high level work products – not passive reading  Specific goals and questions for each perspective or scenario

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Reading Techniques Benefits  Systematic  Focused  Goal-oriented  Transferable via training  Inconclusive studies, however, as to whether or not PBR is significantly better than CBR

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Conclusion  Inspections are better and cheaper in finding defects than testing alone  Earlier detection of defects are possible by inspections  Manual inspections do take a lot of time and may not catch all defects for complex multi-threaded OO software  Static Analysis tools and Reading Techniques alleviate some of these problems  QA plays a key role in leading the inspection process and educating staff in processes, procedures, static analysis tools and in reading techniques

10/1/ Copyright © 2005 QA Insight, Inc. All rights reserved. Links    “How Perspective-Based Reading Can Improve Requirements Inspections” - IEEE Software July 2000  Open source tools:  IEEE Software Engineering BOK:  “Peer Reviews in Software, A Practical Guide” – Karl E. Weigers  Automated Requirement Measurement Tool available for free – see me or send me an for more details  (Karina is programs and education chair – we meet every 1 st Wednesday of the month)