160 likes | 282 Views
Quality Assurance: Reviews and Walkthroughs. Arun Lakhotia University of Southwestern Louisiana Po Box 44330 Lafayette, LA 70504, USA arun@cacs.usl.edu. Reference. Steve McConnell, Code Complete , Microsoft Press, 1993. See Chapter 24 and parts of Chapter 23 Keywords Quality attributes
E N D
Quality Assurance: Reviews and Walkthroughs Arun Lakhotia University of Southwestern Louisiana Po Box 44330 Lafayette, LA 70504, USA arun@cacs.usl.edu (C) 1998, Arun Lakhotia
Reference • Steve McConnell, CodeComplete, Microsoft Press, 1993. • See Chapter 24 and parts of Chapter 23 • Keywords • Quality attributes • Faults, failures • Review • Walkthrough (C) 1998, Arun Lakhotia
Terminology • Failure • Externally observable incorrect behavior • Fault (bug, defect) • Internal cause of the external failure • Fix • Change the internals or environment to remove the failure (C) 1998, Arun Lakhotia
Correctness Usability Efficiency Reliability Integrity Adaptability Robustness Accuracy Maintainability Flexibility Portability Reusability Readability Testability Understandability Software quality characteristics (C) 1998, Arun Lakhotia
Quality trade-offs • Correctness • Functioning exactly to specifications • Adaptability • Used in an environment or application for which it is not designed • Robustness • Functioning in the presence of invalid inputs Increasing one may decrease the other (C) 1998, Arun Lakhotia
Quality improvement techniques • Dynamic -- by executing • Unit testing • Functional testing • Static -- without executing • Inspection • Code walkthroughs • Extern audit • Code reading • Desk check • Proof of correctness • Organizational • Written quality objectives • Development process • Explicit QA activity • Change control process (C) 1998, Arun Lakhotia
Effectiveness of QA techniques • Percent of total defects found in the life of a system by a technique • QA step Mean • Desk checking (Design) - 35% • Informal review - 40% • Formal inspection (Design) - 55% • Formal inspection (Code) - 60% • Prototyping - 65% • Desk-checking code - 40% • Unit testing - 25% • Function testing - 35% • Integration testing - 45% • Field testing - 50% (C) 1998, Arun Lakhotia
Cost of finding defects • In the beginning static techniques are more expensive • Overtime static techniques are cheaper and find higher number of bugs • Code reading found 80% more faults per hour (C) 1998, Arun Lakhotia
Effectiveness of QA techniques • No single technique finds greater than 65% (mean) errors • Unit testing - only 25% • Combination of techniques needed • Combining any two techniques may increase the detection rate two fold • Static and dynamic processes find different types of defects • Dynamic techniques find about 60% (C) 1998, Arun Lakhotia
Cost of fixing defects • How defects are found and the cost of fixing them. • Inspection • Finding and fixing in one step • 3 hours per defect • Testing • Find failure • Find case of failure (bug) and fix • Two steps • 12 hours per defect (C) 1998, Arun Lakhotia
Static techniques • Also called Reviews • Formal Inspection • Code walkthroughs • Code reading (C) 1998, Arun Lakhotia
Formal inspection • “Formal” • Well defined procedure • Well defined roles • Well defined expectations • Well defined output (C) 1998, Arun Lakhotia
Formal Inspection: Roles • Moderator • Author • Reviewers • Scribe • but not Management • The roles of moderator, author, and reviewer should be played by different people. (C) 1998, Arun Lakhotia
Formal Inspection: Process • Planning • Author gives material to moderator • Moderator identifies reviewers, provides them • Material • Checklist • Overiew: Author gives overview • Preparation: • Reviewer work independently and review material • Prepare a list of problems • Based on checklist • Inspectionmeeting • Go over the material at a reasonable pace • Identify defects • Do not fix • Scribe takes notes • Report; Rework; Followup (C) 1998, Arun Lakhotia
Code walkthroughs • Author • identifies possible reviewers • Gives them material • Reviewers • Read the code to find defects • Give feedback in a meeting • Emphasize on defect detection, not removal (C) 1998, Arun Lakhotia
Code Reading • Author • gives code to code readers • Readers • read it independently • prepare a list of problems identified • Give the list to the developer • in meeting • or outside meeting (C) 1998, Arun Lakhotia