LEC 1
LEC 1
Lecture - 1
1
Course Outline
❏ Class Attendance: 10
❏ CT/Assignment: 40
❏ Mid/Presentation: 40
❏ Project (Term Paper): 60
2
Referred Books
3
Outline
4
Introduction to Software Testing
12
Psychology of Software Testing
One of the primary causes of poor program testing is the fact that
most programmers begin with a false definition of the term.
13
Adding Value Through Testing
15
More on the Psychology of Testing
● Myers asserts that “… people perform poorly when they set out on a task that
they know to be infeasible or impossible.”
● “Defining program testing as the process of uncovering errors in a program makes it a
feasible task.”
● “… the process of demonstrating that errors are not present” is “impossible to achieve
for virtually all programs”.
16
Two Definitions from Myers?
18
Software Testing Principles
19
Software Testing Principles
22
Static Testing
29
Inspections (Cont.)
✧ Inspection Agenda:
▪ The programmer narrates, statement by statement, the logic of the
program. And other participants raise questions
▪ The program is analyzed with respect to checklists of historically
common programming errors
▪ The moderator is responsible for ensuring that the discussions proceed
along productive lines
▪ Upon the conclusion of the inspection session, the programmer is
given a list of the errors uncovered
Inspections (Cont.)
✧ Human Agenda:
▪ The testing group must adopt an appropriate attitude to make the
inspection process effective
▪ The programmer must take the process in a positive and
constructive way
▪ If managers somehow make use of the inspection results (to assume
or imply that the programmer is inefficient or incompetent), the
purpose of the process may be defeated.
Inspections (Cont.)
✧ Team Members:
▪ Moderator
▪ Secretary (a person who records all errors found)
▪ Tester
▪ Programer
Walkthroughs (Cont.)
✧ Procedure:
▪ Rather than simply reading the program or using error
checklists, the participants ‘‘play computer”
▪ The tester prepares a small set of paper test cases
▪ During the meeting, each test case is mentally executed
▪ The test data are ‘‘walked through’’ the logic of the program
and the state of the program is monitored on paper or a
whiteboard.
Peer Ratings
Procedure:
○ A programmer is selected to serve as an administrator
○ The administrator selects approximately 6 to 20 participants
○ Each participant is asked to select two of his or her own programs to
be reviewed.
○ Then, they are randomly distributed to the participants.
○ Each participant spends 30 minutes reviewing each program and then
completes an evaluation form by rating the programs.
○ After the review, the participants are given the anonymous evaluation
forms for their two contributed programs.
○ They are also given a statistical summary showing the overall and
detailed ranking of their original programs across the entire set of
programs
Individual Review Techniques
Ad hoc
❏ Reviewers are provided with little or no guidance on how this
task should be performed.
❏ Reviewers often read the work product sequentially, identifying
and documenting issues as they encounter them
❏ This technique is highly dependent on reviewer skills and may
lead to many duplicate issues
Individual Review Techniques
Desk Checking
✧ A desk check can be viewed as a one-person inspection or
walkthrough: A person reads a program, checks it with respect
to an error list, and/or walks test data through it.
✧ Desk checking is relatively unproductive
▪ it is a completely undisciplined process
▪ it runs counter to testing principle 2
✧ Desk checking is best performed by a person other than the
author of the program
Individual Review Techniques
Checklist-based
❏ It is a systematic technique, whereby the reviewers detect
issues based on checklists that are distributed at review
initiation
❏ A review checklist consists of a set of questions based on
potential defects, which may be derived from experience.
❏ Checklists should be specific to the type of work product
❏ The main advantage of the checklist-based technique is a
systematic coverage of typical defect types
Individual Review Techniques
Perspective-based
❏ Reviewers take on different stakeholder viewpoints
❏ Typical stakeholder viewpoints include end user, marketing,
designer, tester, or operations.
❏ It requires the reviewers to attempt to use the program under
review to generate the product they would derive from it
Individual Review Techniques
Role-based
❏ A role-based review is a technique in which the reviewers evaluate
the work product from the perspective of individual stakeholder roles.
❏ Typical roles include specific end user types (experienced,
inexperienced, senior, child, etc.),
❏ Specific roles in the organization (user administrator, system
administrator, performance tester, etc.)
A model of the software testing process
45
General Testing Guidelines
46