140 likes | 305 Views
University of Palestine software engineering department Testing of Software Systems Program Inspections, Walkthroughs, and Reviews instructor: Tasneem Darwish. Outlines. Inspections and Walkthroughs Code Inspections An Error Checklist for Inspections Walkthroughs Desk Checking Peer Ratings.
E N D
University of Palestinesoftware engineering departmentTesting of Software SystemsProgram Inspections, Walkthroughs,and Reviewsinstructor: Tasneem Darwish
Outlines • Inspections and Walkthroughs • Code Inspections • An Error Checklist for Inspections • Walkthroughs • Desk Checking • Peer Ratings
Code Inspections • A code inspection is a set of procedures and error-detection techniques for group code reading. • An inspection team usually consists of four people. • One of the four people plays the role of moderator. • The moderator is expected to be a competent programmer, but he or she is not the author of the program and need not be familiar with the details of the program.
Code Inspections • The duties of the moderator include: • Distributing materials for, and scheduling, the inspection session • Leading the session • Recording all errors found • Ensuring that the errors are subsequently corrected • The moderator is like a quality-control engineer. • The second team member is the programmer.
Code Inspections • The remaining team members usually are the program’s designer (if different from the programmer) and a test specialist. • The moderator distributes the program’s listing and design specification to the other participants several days in advance of the inspection session. • The participants are expected to familiarize themselves with the material prior to the session.
Code Inspections • During the session, two activities occur: • First activity: • The programmer recite, statement by statement, the logic of the program. • During the discourse, other participants should raise questions, and they should be pursued to determine whether errors exist. • It is likely that the programmer rather than the other team members will find many of the errors found during this narration. • In other words, the simple act of reading aloud a program to an audience seems to be a remarkably effective error-detection technique.
Code Inspections • During the session, two activities occur: • Second activity: • The program is analyzed with respect to a checklist of historically common programming errors (such a checklist is discussed in the next section).
Code Inspections • The moderator is responsible for ensuring that the discussions proceed along productive lines and that the participants focus their attention on finding errors, not correcting them. • After the session, the programmer is given a list of the errors found. • If more than a few errors were found, or if any of the errors requires a extensive correction, the moderator might make arrangements to reinspect the program after the errors are corrected.
Code Inspections • This list of errors is also analyzed, categorized, and used to refine the error checklist to improve the effectiveness of future inspections. • The time and location of the inspection should be planned to avoid all outside interruptions. • The optimal amount of time for the inspection session appears to be from 90 to 120 minutes. • Since the session is a mentally taxing experience, longer sessions tend to be less productive.
Code Inspections • Most inspections proceed at a rate of approximately 150 program statements per hour. • For that reason, large programs should be examined in multiple inspections, each inspection dealing with one or several modules or subroutines. • If the programmer views the inspection as an attack on his or her character and adopts a defensive posture, the process will be ineffective.
Code Inspections • Rather, the programmer must approach the process with an egoless attitude and must place the process in a positive and constructive light • For this reason, most people recommend that the results of an inspection be a confidential matter, shared only among the participants. • In particular, if managers somehow make use of the inspection results, the purpose of the process can be defeated.
Code Inspections • The inspection process also has several beneficial side effects in addition to its main effect of finding errors. • For one thing, the programmer usually receives feedback concerning programming style, choice of algorithms, and programming techniques. • The other participants gain in a similar way by being exposed to another programmer’s errors and programming style.
Code Inspections • Finally, the inspection process is a way of identifying early the most error level sections of the program, helping to focus more attention on these sections during the computer-based testing processes