Académique Documents
Professionnel Documents
Culture Documents
Teknik Elektro S1
http://ocw.usu.ac.id
DEPATEMEN TEKNIK ELEKTRO
FAKULTAS TEKNIK
UNIVERSITAS SUMATERA UTARA
Jl. Almamater, Kampus USU, Medan 20155
Phone: 061‐8213246, Fax: 061‐8213250
COURSE SYLLABUS
Course No : TEK‐336
Unit : 2 credits
Course Title : Rekayasa Perangkat Lunak
Class Schedule : Tuesday, 13.10‐14.50
Lecturer : F. Rizal Batubara (rizal@usu.ac.id)
Description
This course will study a collection of methods which embody an "engineering" approach
to the development of computer software. We will discuss the nature of software and
software projects, software development models, software process maturity, project
planning, management, and communication. We will study methods for analysis, design,
testing, and implementation of large, complex software systems. We will inquire into
the various perspectives on software quality ‐‐ what it means, how to measure it, how
to improve it.
Course Objectives
After finishing this course, students should be able to understand:
• concept of software process
• activities in software development
• technical and managerial aspects of software development related to development
methodologies, maturity level of the software developer organization
• various life cycle models for software development
• software quality assurance process
• competency of software engineer profesional
1
Method of Delivery
This is a student‐centered type of teaching where there will be lots of discussions and
sharing experiences among us. Students are fully suggested to be active and
participative.
Required Reading
[1] Pressman, Roger. Software Engineering: A Practitioner’s Approach, 6th Edition,
Mc.Graw‐Hill International, USA, 2005.
[2] Sommerville, Ian, Software Engineering, 7th Edition, Pearson Addison Wesley,
England, 2004
[3] Online: www.sei.cmu.edu
Assignments
Readings. Readings are an essential part of your effort to understand the materials. I
suggest that you read ahead and use class time to ask questions that weren’t clear in
the readings or to share your thoughts with the class.
Class Participation. Class participations consist of question and answer (Q/A) session,
and class present. Q/A provides immediate feedback on previous materials and will be
administered at the end of each chapter. Class participation constitutes 10 percent of
your grade.
Quizzes. There will be quizzes delivered in class a. No notification being made in advance
to deliver quiz. You have to be ready anytime for a short time quiz as a medium for
immediate feedback.
Case Analysis (Individual Project). The purpose of the case analysis is to summarize your
thought processes and communicate them in writing. The length of the paper is limited
to ten pages, 1.5‐spaced with margins not exceeding one inch. Your paper should be
simple, concise and well‐written. Detailed instructions will be given in class.
Group Project. There will be one software engineering project, which you will do as part
of a team. The project will require you to make incremental deliveries through out the
term, which will be graded. The objective of the project is to give you experience trying
to apply the principles and techniques covered in the course, as part of team working on
a real software product. The project will be carried out step‐by‐step. The progress will
be monitored accordingly.
Exams. There will be two exams. The midterm will cover the first eight weeks of the
course materials. The final exam will cover the next eight weeks of the course materials.
These examinations will be "closed book". That is, no books or reference materials will
be allowed in the examination room. These are the main check on how much you have
learned from the course.
2
Evaluation
Your final grade will not rest on one or two exams but will be based on how many points
you accumulate throughout the semester. My view is that this would better reflect your
learning process and would minimize anxiety associated with exams. The weights
assigned to each component are as follows:
Class participation 10%
Quizzes 10%
Individual project 10%
Group Project 20%
Midterm exams 20%
Final exams 30%
Total 100%
Class Policies
Attendance. Students are expected to attend class regularly. There are 80% minimum
attendance requirements, and attendance sheets will be passed out and will be factored
into your class participation grade. In the case of absence, students are responsible to
stay current on information regarding materials covered in class and any changes in
schedule.
Late Assignments. For each day an assignment is turned late, the total grade will be
deducted 5 (five) points. If you have a justified reason for not turning the assignment on
time (e.g., due to extenuating circumstances), please let me know prior to the due date.
I want to be flexible, yet fair to other students in the class. All late assignments are to be
turned in to department.
Academic dishonesty and Incompletes. Each student should be familiar with the
guidelines set in the “Code of Student Ethics” for issues pertaining to academic
dishonesty. No incompletes (I) will be assigned. There will be no makeup exams unless
prior notice is given and documentation of emergency is given.
3
Topics and Schedule
8 16‐28 Mar Mid Term Exam
4
Part 1
Introduction to
Software Engineering
2
What is Software?
Software is a set of items or objects
that form a “configuration” that
includes
• programs
• documents
• data ...
3
What is Software?
• software is engineered
• software doesn’t wear out
• software is complex
4
Wear vs. Deterioration
increased failure
rate due to side effects
Failure
rate
change
actual curve
idealized curve
Time
5
Software Applications
• System software
• Application software
• Engineering/scientific software
• Embedded software
• Product-line software
• WebApps (Web applications)
• AI software
6
Software—New Categories
• Ubiquitous computing—wireless networks
• Netsourcing—the Web as a computing engine
• Open source—”free” source code open to the
computing community (a blessing, but also a
potential curse!)
• Also … (see Chapter 32)
• Data mining
• Grid computing
• Cognitive machines
• Software for nanotechnologies 7
Legacy Software
• Software must be adapted to meet the needs of new
computing environments or technology.
• Software must be enhanced to implement new business
requirements.
• Software must be extended to make it interoperable
with other more modern systems or databases.
• Software must be re-architected to make it viable within
a network environment.
8
E-Type Systems
• E-Type Systems:
Software that has been implemented in a real-world
computing context and will therefore evolve over
time
9
Software Evolution
• The Law of Continuing Change (1974): E-type systems must be continually adapted else they become
progressively less satisfactory.
• The Law of Increasing Complexity (1974): As an E-type system evolves its complexity increases unless
work is done to maintain or reduce it.
• The Law of Self Regulation (1974): The E-type system evolution process is self-regulating with
distribution of product and process measures close to normal.
• The Law of Conservation of Organizational Stability (1980): The average effective global activity rate in
an evolving E-type system is invariant over product lifetime.
• The Law of Conservation of Familiarity (1980): As an E-type system evolves all associated with it,
developers, sales personnel, users, for example, must maintain mastery of its content and behavior to
achieve satisfactory evolution.
• The Law of Continuing Growth (1980): The functional content of E-type systems must be continually
increased to maintain user satisfaction over their lifetime.
• The Law of Declining Quality (1996): The quality of E-type systems will appear to be declining unless they
are rigorously maintained and adapted to operational environment changes.
• The Feedback System Law (1996): E-type evolution processes constitute multi-level, multi-loop, multi-
agent feedback systems and must be treated as such to achieve significant improvement over any
reasonable base.
10
Software Myths
• Affect managers, customers (and other non-
technical stakeholders) and practitioners
• Are believable because they often have elements of
truth,
• but …
• Invariably lead to bad decisions,
• therefore …
• Insist on reality as you navigate your way through
software engineering
11
Management Myths
• “We already have a book of standards and
procedures for building software. It does provide my
people with everything they need to know …”
• “If my project is behind the schedule, I always can
add more programmers to it and catch up …”
(a.k.a. “The Mongolian Horde concept”)
• “If I decide to outsource the software project to a
third party, I can just relax: Let them build it, and I
will just pocket my profits …”
12
Customer Myths
• “A general statement of objectives is sufficient to
begin writing programs - we can fill in the details
later …”
13
Practitioner’s Myths
• “Let’s start coding ASAP, because once we write the
program and get it to work, our job is done …”
Chapter 2
Process: A Generic View
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
A Layered Technology
Software Engineering
tools
methods
process model
a “quality” focus
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
A Process Framework
Process framework
Framework activities
work tasks
work products
milestones & deliverables
QA checkpoints
Umbrella Activities
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
Framework Activities
Communication
Planning
Modeling
Analysis of requirements
Design
Construction
Code generation
Testing
Deployment
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Umbrella Activities
Software project management
Formal technical reviews
Software quality assurance
Software configuration management
Work product preparation and production
Reusability management
Measurement
Risk management
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
The Process Model:
Adaptability
the framework activities will always be applied on
every project ... BUT
the tasks (and degree of rigor) for each activity will
vary based on:
the type of project
characteristics of the project
common sense judgment; concurrence of the project
team
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
The CMMI
The CMMI defines each process area in terms of
“specific goals” and the “specific practices” required to
achieve these goals.
Specific goals establish the characteristics that must
exist if the activities implied by a process area are to be
effective.
Specific practices refine a goal into a set of process-
process-
related activities.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Process Patterns
Process patterns define a set of activities, actions, work
tasks, work products and/or related behaviors
A template is used to define a pattern
Typical examples:
Customer communication (a process activity)
Analysis (an action)
Requirements gathering (a process task)
Reviewing a work product (a process task)
Design model (a work product)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
Process Assessment
The process should be assessed to ensure that it meets
a set of basic process criteria that have been shown to
be essential for a successful software engineering.
Many different assessment options are available:
SCAMPI
CBA IPI
SPICE
ISO 9001:2000
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Assessment and Improvement
Software Process
Software Process
Assessment
Capability
Software Process leads to leads to
Determination
Improvement
motivates
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Personal Software Process
(PSP)
Recommends five framework activities:
Planning
High--level design
High
High--level design review
High
Development
Postmortem
stresses the need for each software engineer to
identify errors early and as important, to
understand the types of errors
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Team Software Process (TSP)
Each project is “launched” using a “script” that
defines the tasks to be accomplished
Teams are self-
self-directed
Measurement is encouraged
Measures are analyzed with the intent of
improving the team process
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
The Primary Goal of Any Software
Process: High Quality
Remember:
Why?
Less rework!
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Software Engineering: A Practitioner’s Approach,
6/e
Chapter 3
Prescriptive Process Models
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
Prescriptive Models
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
Waterfall Model
Com m unic a t ion
proje c t init ia t ion Planning
re quire m e nt ga t he ring estimating Mode ling
scheduling
analysis Const r uc t ion
tracking
design De ploy m e nt
code
t est de liv e ry
s upport
f e e dba c k
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
Incremental Model
increment # n
Co m m u n i c a t i o n
Pl a nni ng
M ode l ing
a na ly s is Co n s t ru c t i o n
d es ig n
c od e De p l o y m e n t
t es t d e l iv e ry
fe e dba c k
deliv ery of
nt h increment
increment # 2
Co m m u n i c a t i o n
Pl a nnin g
M ode l ing
an a ly s i s Co n s t ru c t i o n
de s ig n c od e De p l o y m e n t
t es t d e li v e ry
fe e dba c k
deliv ery of
increment # 1 2nd increment
Co m m u n i c a t i o n
Pl a nning
M ode li ng
a n al y s is Co n s t ru c t i o n
d e s i gn code De p l o y m e n t
t es t d e l i v e ry deliv ery of
fe e dba c k
1st increment
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Incremental Model
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
RAD Model
Team # n
M o d e lin g
business m odeling
dat a m odeling
process m odeling
C o n s t r u c t io n
com ponent reuse
Team # 2 aut om at ic code
Com m unicat ion generat ion
t est ing
Mo d eling
b u si n e ss m o d e l in g
dat a m odeling
p ro ce ss m o d e l in g
Planning
Co nst r uct io n De ploym e nt
Team # 1 co m p o n e n t re u se
int egrat ion
a u t o m a t i c co d e
g e n e ra t i o n
deliv ery
Mode ling t e st i n g feedback
business modeling
dat a modeling
process modeling
6 0 - 9 0 days
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
RAD Model
Emphasizes short development cycle
If requirements are well understood and project scope is
constrained, it may allow rapid creation of S/W systems
For large projects may require vast human resources (for
many RAD teams)
Developers and customers must be able to cope with fast
action
For systems that are not highly modularized the RAD
approach may not work
If systems require mutual tuning of various components, the
RAD approach may not work
RAD may not be appropriate with technical risks high (new
technology)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Evolutionary Models: Prototyping
Q u ick p lan
Quick
Com m unicat ion plan
communication
Mo d e lin g
Modeling
Qu ick d e sig n
Quick design
Deployment
Deployment
De live r y
delivery & Const r uct ion
& Fe e dback Construction
feedback of
ofot
pr prototype
ot ype
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
Evolutionary Models: Prototyping
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Evolutionary Models: The Spiral
planning
estimation
scheduling
risk analysis
communication
modeling
analysis
design
start
deployment
construction
delivery code
feedback test
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Evolutionary Models: The Spiral
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Evolutionary Models: Concurrent
none
Modeling ac t iv it y
rep resent s t he st at e
Under o f a so f t ware eng ineering
act ivit y o r t ask
dev elopm ent
A w ait ing
changes
Under review
Under
revis ion
Baselined
Done
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
Evolutionary Models: Concurrent
The former image depicted only the modeling activity
Indeed, concurrent engineering is a set of framework activities
such as Communication, Modeling, etc.
Each of these activities is in one of its states…
PROBLEMS::
PROBLEMS
Prototyping (and other evolutionary processes) pose problems
to project planning (too much uncertainty)
Evolutionary speed may not be optimal: too slow affects
productivity, too fast leads to chaos
Sometimes software processes should focus on flexibility and
extensibility, rather than on quality - delivery delays may make
us miss the market niche and window of opportunity
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Still Other Process Models
Component based development— development—the process to apply
when reuse is a development objective
Formal methods— methods—emphasizes the mathematical
specification of requirements
AOSD
AOSD— —provides a process and methodological
approach for defining, specifying, designing, and
constructing aspects like security, fault tolerance,
adherence to business rules, systemic: DB mirroring,
memory management, concurrency
Unified Process— Process—a “use- “use-case driven, architecture- architecture-
centric, iterative and incremental” software process
closely aligned with the Unified Modeling Language
(UML)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
The Unified Process (UP)
Elabo r at ion
elaboration
Incept ion
inception
inception
const r uct io n
Release
t r ansit ion
soft ware increment
pr o duct ion
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15
UP Phases
UP Phases
Incept ion Elaborat ion Const ruct ion Transit ion Product ion
Workflows
Requirements
Analysis
Design
Implementation
Test
Support
Iterations #1 #2 #n-1 #n
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Incept ion phase
UP Work Products
Elaborat ion phase
Vision document
Init ial use-case model
Init ial project glossary Const ruct ion phase
Use-case model
Init ial business case Supplement ary requirement s
Init ial risk assessment . including non-funct ional Transit ion phase
Design model
Project plan, Analy sis model Soft ware component s
phases and it erat ions. Soft ware archit ect ure Deliv ered soft ware increment
Int egrat ed soft ware
Business model, Descript ion. increment Bet a t est report s
if necessary . Execut able archit ect ural General user feedback
Test plan and procedure
One or more prot ot y pes prot ot y pe.
I nc e pt i o
Test cases
n Preliminary design model Support document at ion
Rev ised risk list user manuals
Project plan including inst allat ion manuals
it erat ion plan descript ion of current
adapt ed workflows increment
milest ones
t echnical work product s
Preliminary user manual
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
Software Engineering: A Practitioner’s Approach,
6/e
Chapter 4
Agile Development
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
The Manifesto for
Agile Software Development
“We are uncovering better ways of developing software
by doing it and helping others do it. Through this work
we have come to value:
•Individuals and interactions over processes and
tools
•Working software over comprehensive
documentation
•Customer collaboration over contract negotiation
•Responding to change over following a plan
That is, while there is value in the items on the right, we
value the items on the left more.”
Yielding …
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
An Agile Process
Is driven by customer descriptions of what is
required (scenarios)
Recognizes that plans are short-
short-lived
Develops software iteratively with a heavy
emphasis on construction activities
Delivers frequent, multiple ‘software increments’
Adapts as changes occur
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Agile Team
Characteristics
Competence
Common focus
Collaboration
Decisiveness
Fuzzy problem-
problem-solving ability
Mutual trust and respect
Self--organization
Self
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
Extreme Programming (XP)
The most widely used agile process, originally
proposed by Kent Beck
XP Planning
Begins with the creation of “user
“user stories”
stories”
Agile team assesses each story and assigns a cost
Stories are grouped to for a deliverable increment
A commitment is made on delivery date
After the first increment “project
“project velocity”(I.e.
velocity”(I.e. No. of
“stories
stories”” implemented during 1st release) is used to help
define subsequent delivery dates for other increments
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
Extreme Programming (XP)
XP Design
Follows the KIS principle
Encourage the use of CRC (Class-
(Class-Responsibility Collaborator) cards (see
Chapter 8)
For difficult design problems, suggests the creation of “spike
“spike solutions”
solutions”—a design
prototype (tool for lowering risks)
Encourages “refactoring
“refactoring””—an iterative refinement of the internal program design
XP Coding
Recommends the construction of a unit test for a store before coding commences
Encourages “pair
“pair programming”
programming”
XP Testing
All unit tests are executed daily
“Acceptance tests” are defined by the customer and executed to assess customer
visible functionality
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Extreme Programming (XP)
spike solut ions
simple design
prot ot ypes
CRC cards
user st ories
values
accept ance t est crit eria
it erat ion plan
pair
programming
Release
sof t ware increment
unit t est
project velocit y comput ed cont inuous int egrat ion
accept
These courseware materials are to be used in conjunction ance
with t estEngineering:
Software ing A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
Adaptive Software Development
Originally proposed by Jim Highsmith
Useful to changing project and business
conditions
ASD — distinguishing features
Mission-driven planning
Mission-
Component--based focus
Component
Uses “time
“time--boxing
boxing”” (See Chapter 24)
Explicit consideration of risks
Emphasizes collaboration for requirements gathering
Emphasizes “learning
“learning”” throughout the process
(focus groups; technical reviews; postmortems)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Adaptive Software Development
adapt ive cycle planning Requirement s gat hering
uses mission st at ement JAD
project const raint s mini-specs
basic requirement s
t ime-boxed release plan
Release
sof t ware increment
adjust ment s f or subsequent cycles
component s implement ed/ t est ed
f ocus groups for f eedback
f ormal t echnical reviews
post mort
These courseware materials are to be used in conjunction with Software Engineering: ems Approach, 6/e and are provided
A Practitioner’s
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Dynamic Systems Development Method
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Scrum
Originally proposed by Schwaber and Beedle
“Assumes up-
up-front that chaos exists”
Scrum — distinguishing features:
Small work teams (min. overhead; max. communication)
Development work is partitioned into “packets
“packets””
Testing and documentation are on- on-going as the product is
constructed
Work occurs in “sprints
“sprints”” and is derived from a “backlog
“backlog”” of
existing requirements (frequent S/W increments)
Meetings are very short and sometimes conducted without chairs
“demos
demos”” are delivered to the customer with the time-
time-box allocated
Constant testing and documentation
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
Crystal
Proposed by Cockburn and Highsmith
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Feature Driven Development
Originally proposed by Peter Coad et al.
FDD — distinguishing features:
Emphasis is on defining “features”
a feature “is a client-
client-valued function that can be implemented in two
weeks or less.”
Uses a feature template
<action> the <result> <by | for | of | to> a(n) <object>, viz:
Add the product to a shopping cart
Display the technical specs of a product
A features list is created and “plan
“plan by feature”
feature” is conducted
Design and construction merge in FDD
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
Agile Modeling
Originally proposed by Scott Ambler
Suggests a set of agile modeling principles:
Model with a purpose
Use multiple models for different aspects of the system
Travel light (keep only long-
long-term models)
Content is more important than representation
Know the models and the tools you use to create them
Adapt locally (to the needs of the agile team)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15
Software Engineering: A Practitioner’s Approach, 6/e
Chapter 6
System Engineering
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
System … Wazzat?
A set or arrangement of things related to
form a unity or organic whole
A set of facts, rules, principles, etc…
classified and arranged to show a logical
plan linking the various parts
A method or plan of classification or
arrangement
An established method of doing
something; method; procedure
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
Computer--Based System
Computer
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
System Engineering
Elements of a computer-
computer-based system
Software
Hardware
People
Database
Documentation
Procedures
Systems
A hierarchy of macro-
macro-elements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
The Hierarchy
Business or
Product Domain
World view
Domain of interest
Domain view
System element
Element view
Detailed view
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
System Modeling
Define the processes that serve the needs of the view under
consideration.
Represent the behavior of the processes and the assumptions
on which the behavior is based.
Explicitly define both exogenous and endogenous input to the
model.
Exogenous inputs link one constituent of a given view with other
constituents at the same level of other levels; endogenous input
links individual components of a constituent at a particular view.
Represent all linkages (including output) that will enable the
engineer to better understand the view.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
System Modeling
Restraining factors:
ASSUMPTIONS reduce the number of possible
permutations or variations
SIMPLIFICATIONS enable to create a model in a timely
fashion
LIMITATIONS help to bound the system
CONSTRAINTS guide the manners in which a model is
created and approaches taken when implementing the
model
PREFERENCES indicate preferred architecture for all data,
functions and technology. May clash with other restraining
factors
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
System Simulation
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
System Engineering
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Business Process Engineering
Uses an integrated set of procedures,
methods, and tools to identify how
information systems can best meet the
strategic goals of an enterprise
Focuses first on the enterprise and then on
the business area
Creates enterprise models, data models and
process models
Creates a framework for better information
management distribution, and control
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
System Architectures
Three different architectures must be analyzed and designed
within the context of business objectives and goals:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
The BPE Hierarchy
Information strategy planning (ISP)
strategic goals defined
success factors/business rules identified
enterprise model created
Application Engineering
a.k.a ... software engineering
modeling applications/procedures that
address (BAA) and constraints of ISP
Technical issues
Create a top-
top-level data model
Cluster by business/organizational area
Refine model and clustering
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Defining Objectives and Goals
Objective—general statement of direction
Objective—
Goal—
Goal—defines measurable objective: “reduce
manufactured cost of our product”
Subgoals
Subgoals::
decrease reject rate by 20% in first 6 months
gain 10% price concessions from suppliers
re
re--engineer 30% of components for ease of manufacture
during first year
Objectives tend to be strategic while goals tend
to be tactical
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
Business Area Analysis
Define “naturally cohesive groupings of business
functions and data” (Martin)
Perform many of the same activities as ISP, but
narrow scope to individual business area
Identify existing (old) information systems /
determine compatibility with new ISP model
Define systems that are problematic
Defining systems that are incompatible with new
information model
Begin to establish re-
re-engineering priorities
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15
The BAA Process
admin.
manufacturing
sales QC distribution
acct eng’ring
Process
Decomposition Matrices
Process Diagram e.g.,
Flow Data entity/process
Models Model matrix
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Product Engineering
The complete
System analysis
product
(World view)
capabilities
hardware software
Component
engineering
(Domain view)
Processing requirement
function behavior
Analysis & Design
data
Modeling
(Element view)
program
component Software
Engineering
Construction
&
Integration
(Detailed view)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
Product Architecture Template
(after Hatley-
Hatley-Pirbhai)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18
Architecture Flow Diagram
operator
interface operator requests CLSS queries, reports, displays
operator
interface
subsystem
bar code acquisition request
shunt control status
sorting reports
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19
System Modeling with UML
Deployment diagrams
Each 3-
3-D box depicts a hardware element that is part of
the physical architecture of the system
Activity diagrams
Represent procedural aspects of a system element
Class diagrams
Represent system level elements in terms of the data that
describe the element and the operations that manipulate
the data
These and other UML models will be discussed later
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 20
Deployment Diagram
CLSS processor
Sensor dat a
shunt cont roller
acquisit ion subsyst em
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21
Activity Diagram
st a rt c o n v e y o r l in e
re a d b a r c o d e g e t c o n v e y o r sp e e d
d e t e r m i n e b i n l o c a t io n se t f o r re je c t b i n
se n d sh u n t
c o n t ro l d a t a
g e t sh u n t st a t u s re a d b a r c o d e g e t c o n v e y o r st a t u s
p ro d u c e re p o rt e n t ry
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22
Class Diagram
class name
Box
at t ribut es
barcode not e use of capit al
forwardSpeed let t er f or mult i-word
conveyorLocat ion at t ribut e names
height
widt h
dept h
weight
cont ent s
operat ions
( parent heses at end
readBarcode( ) of name indicat e t he
updat eSpeed ( ) list of at t ribut es t hat t he
readSpeed( ) operat ion requires)
updat eLocat ion( )
readLocat ion( )
get Dimensions( )
get Weight( )
checkCont ent s( )
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23
Software Engineering: A Practitioner’s Approach, 6/e
Chapter 7
Requirements Engineering
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
Requirements Engineering
Stages:
Inception
Elicitation
Elaboration
Negotiation
Specification
Validation
Management
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
Requirements Engineering
Inception—
Inception—ask a set of questions that establish …
basic understanding of the problem
the people who want a solution
the nature of the solution that is desired, and
the effectiveness of preliminary communication and collaboration between
the customer and the developer
Elicitation—
Elicitation—elicit requirements from all stakeholders
address problems of scope
address problems of understanding
customers not sure about what is needed, skip “obvious” issues, have difficulty
communicating with the software engineer, have poor grasp of problem domain
address problems of volatility
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
Requirements Engineering
Elaboration—create an analysis model that identifies data,
Elaboration—
function, features, constraints and behavioral requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Requirements Engineering
Specification—
Specification—can be any one (or more) of the following:
A written document
A set of models
A formal mathematical model
A collection of user scenarios (use-
(use-cases)
A prototype
Validation—
Validation—a review mechanism that looks for:
errors in content or interpretation
areas where clarification may be required
missing information
inconsistencies (a major problem when large products or systems
are engineered)
conflicting or unrealistic (unachievable) requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
Requirements Engineering
Requirements management involves managing change:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
Inception
Identify stakeholders
“whom else do you think I should talk to?”
Recognize multiple points of view
Work toward collaboration
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Inception
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
Inception
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Eliciting Requirements
Meetings are conducted and attended by both software
engineers and customers
Rules for preparation and participation are established
An agenda is suggested
A "facilitator" (can be a customer, a developer, or an outsider)
controls the meeting
A "definition mechanism" (can be work sheets, flip charts, or wall
stickers or an electronic bulletin board, chat room or virtual
forum) is used
The goal is
to identify the problem
propose elements of the solution
negotiate different approaches, and
specify a preliminary set of solution requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Conduc t FA ST
m eet ings
Make lis t s of
f unc t ions , c lass es
Mak e list s of
c ons t raint s , et c .
draw use-c as e
writ e s c enario
diagram
Creat e Use-c as es
c om plet e t em plat e
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Quality Function Deployment
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
Quality Function Deployment
Function deployment determines the “value” (as
perceived by the customer) of each function required of
the system
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
Use--Cases
Use
A collection of user scenarios that describe the thread of usage of a system
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15
Use--Case Diagram
Use
Arms/ disarms
syst em
homeow ner
Responds t o
alarm event
Encount ers an
error condit ion
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Building the Analysis Model
Intent: to provide a description of the required
informational, functional and behavioral domains
of the computer-
computer-based system
Is a series of time-
time-ordered snapshots of
requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
Building the Analysis Model
Elements of the analysis model
Scenario--based elements
Scenario
Functional—processing narratives for software functions
Functional—
Use--case—
Use case—descriptions of the interaction between an
“actor” and the system
Class--based elements
Class
Implied by scenarios
Behavioral elements
State diagram
Flow--oriented elements
Flow
Data flow diagram
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18
Class Diagram
From the SafeHome system …
Sensor
name/id
type
location
area
characteristics
identify()
enable()
disable()
reconfigure()
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19
State Diagram
Reading
Init ializat ion
commands not jammed
st art copies
ent ry/ st art copies paper jammed ent ry/ paper empt y
do: manage copying do: lower paper t ray
do: monit or paper t ray do: monit or f ill swit ch
do: monit or paper f low problem diagnosis do: r aise paper t ray
syst em st at us=“Jammed”
display msg = “paper jam”
display message=locat ion
display st at us= blinking not jammed
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21
Negotiating Requirements
Negotiate
Work toward a set of requirements that lead to “win-
“win-win”
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22
Validating Requirements
Checking for Consistency, Omissions, Ambiguity
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23
Validating Requirements
Is each requirement achievable in the technical environment that will house
the system or product?
Does the requirements model properly reflect the information, function and
behavior of the system to be built.
Chapter 8
Analysis Modeling
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
Requirements Analysis
Requirements analysis
specifies software’s operational characteristics
indicates software's interface with other system elements
establishes constraints that software must meet
Requirements analysis allows the software engineer
(called an analyst or modeler in this role) to:
elaborate on basic requirements established during earlier
requirement engineering tasks
build models that depict user scenarios, functional activities,
problem classes and their relationships, system and class
behavior, and the flow of data as it is transformed.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
A Bridge
system
description
analysis
model
design
model
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Domain Analysis
Software domain analysis is the identification,
analysis, and specification of common requirements
from a specific application domain, typically for reuse on
multiple projects within that application domain . . .
[Object
Object--oriented domain analysis is] the identification,
analysis, and specification of common, reusable
capabilities within a specific application domain, in
terms of common objects, classes, subassemblies, and
frameworks . . .
Donald Firesmith
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
Domain Analysis
Define the domain to be investigated.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
Analysis Modeling Approaches
STRUCTURED ANALYSIS considers data and
processes transforming the data as separate entities.
Data objects are modeled defining their attributes and
relationships. Processes depict transformation of data
objects as they flow through the system.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Data Modeling
Examines data objects independently of
processing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Typical Objects
external entities (printer, user, sensor)
things (e.g, reports, displays, signals)
occurrences or events (e.g., interrupt, alarm)
roles (e.g., manager, engineer, salesperson)
organizational units (e.g., division, team)
places (e.g., manufacturing floor)
structures (e.g., employee record)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Data Objects and Attributes
A data object contains a set of attributes that
act as an aspect, quality, characteristic, or
descriptor of the object
object: automobile
attributes:
make
model
body type
price
options code
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
What is a Relationship?
relationship —indicates “connectedness”;
a "fact" that must be "remembered"
by the system and cannot or is not computed
or derived mechanically
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
E-R Diagrams
One common form:
(0, m)
object1 relationship object 2
(1, 1)
attribute
Another common form:
object1 relationship
object 2
(0, m) (1, 1)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Building an ERD
Level 1—
1—model all data objects (entities) and their
“connections” to one another
Level 2—
2—model all entities and relationships
Level 3—
3—model all entities, relationships, and the
attributes that provide further depth
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
The ERD: An Example
request
Customer places
for service
(1,1) (1,m)
(1,1)
standard generates (1,n) work
task table order
(1,1) (1,1) (1,1)
selected work (1,w) consists
from (1,w) tasks of
(1,i)
materials lists
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15
Object--Oriented Concepts
Object
Must be understood to apply class -
based elements of the analysis model
Key concepts:
Classes and objects
Attributes and operations
Encapsulation and instantiation
Inheritance
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Classes
• object-oriented thinking begins with the
object-
definition of a class, often defined as:
– template
– generalized description
– “blueprint” ... describing a collection of
similar items
• a metaclass (also called a superclass
superclass))
establishes a hierarchy of classes
• once a class of items is defined, a
specific instance of the class can be
identified
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
Building a Class
class name
attributes:
operations
attributes:
operations:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18
What is a Class?
occurrences roles
things organizational units
places
external entities
structures
class name
attributes:
operations:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19
Encapsulation/Hiding
The object encapsulates
both data and the logical
procedures required to
manipulate the data method method
#2
#1
data
method
method #3
#6
method method
#5 #4
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 20
Class Hierarchy
PieceOfFurniture (superclass)
subclasses of the
instances of Chair
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21
Methods
(a.k.a. Operations, Services)
An executable procedure that is
encapsulated in a class and is designed
to operate on one or more data attributes
that are defined as part of the class.
A method is invoked
via message passing.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22
Scenario--Based Modeling
Scenario
“[Use-cases] are simply an aid to defining what exists
“[Use-
outside the system (actors) and what should be
performed by the system (use-
(use-cases).” Ivar Jacobson
(1) What should we write about?
(2) How much should we write about it?
(3) How detailed should we make our description?
(4) How should we organize the description?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23
Use--Case
Use
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 24
Developing a Use-
Use-Case
What are the main tasks or functions that are performed
by the actor?
Access camera
surveillance via t he cameras
Int ernet
homeowner
Set alarm
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 26
Activity Diagram
Supplements the use-
use-case ent er password
and user ID
by providing a diagrammatic
representation of procedural
flow valid passwor ds/ ID invalid passwor ds/ ID
selec t specif ic
select c amera icon
camera - t humbnails
prompt f or
anot her v iew
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 27
Swimlane Diagrams
Allow the modeler to represent the flow of activities described by the use-
use-case and at the
same time indicate which actor (if there are multiple actors involved in a specific use-
use-case)
or analysis class has responsibility for the action described by an activity rectangle
home owne r c a m e ra i n t e rf a c e
ent er password
and user ID
valid p asswo r d s/ ID
in valid
p asswo r d s/ ID
select m ajor f unct ion
o t h er f u n ct io n s prom pt f or reent ry
m ay also b e
select ed
in p u t t r ies
select surveillance r em ain
n o in p u t
t r ies r em ain
select specif ic
select cam era ic on
cam era - t hum bnails
generat e video
out put
exit t h is
f u n ct io n
see
an o t h er
cam er a
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 28
Flow--Oriented Modeling
Flow
Represents how data objects are transformed at they
move through the system
A data flow diagram (DFD) is the diagrammatic form that
is used
Considered by many to be an ‘old school’ approach, flow-
flow-
oriented modeling continues to provide a view of the
system that is unique—
unique—it should be used to supplement
other analysis model elements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 29
The Flow Model
Every computer-
computer-based system is an
information transform ....
computer
input based output
system
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 30
Flow Modeling Notation
external entity
process
data flow
data store
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 31
External Entity
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 32
Process
A data transformer (changes input
to output)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 33
Data Flow
base
compute
area
triangle
height area
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 34
Data Stores
Data is often stored for later use.
sensor #
sensor #, type,
look-up
look- location, age
sensor
report required data
type,
location, age
sensor number
sensor data
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 35
Data Flow Diagramming:
Guidelines
All icons must be labeled with meaningful
names
The DFD evolves through a number of
levels of detail
Always begin with a context level diagram
(also called level 0)
Always show external entities at level 0
Always label data flow arrows
Do not represent procedural logic
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 36
Constructing a DFD — I
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 37
Level 0 DFD Example
processing
user request requested
video
digital signal
video monitor
processor
video
source NTSC
video signal
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 38
Constructing a DFD — II
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 39
The Data Flow Hierarchy
a b
x P y level 0
a c p2
p1
f
d p4 5 b
p3 e g
level 1
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 40
Flow Modeling Notes
Each bubble is refined until it does just one thing
PSPEC
narrative
pseudocode (PDL)
equations
tables
diagrams and/or charts
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 42
DFDs: A Look Ahead
analysis model
Maps into
design model
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 43
Control Flow Diagrams
Represents “events
“events”” and the processes that manage
events
An “event” is a Boolean condition that can be
ascertained by:
listing all sensors that are "read" by the software.
listing all interrupt conditions.
listing all "switches" that are actuated by an operator.
listing all data conditions.
recalling the noun/verb parse that was applied to the processing
narrative, review all "control items" as possible CSPEC
inputs/outputs.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 44
The Control Model
the control flow diagram is "superimposed" on the DFD
and shows events that control the processes noted in
the DFD
control flows—
flows—events and control items—
items—are noted by
dashed arrows
a vertical bar implies an input to or output from a control
spec (CSPEC) — a separate specification that
describes how control is handled
a dashed arrow entering a vertical bar is an input to the
CSPEC
empty
reload create
process user
displays
perform
problem
diagnosis
jammed
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 46
Control Specification (CSPEC)
The CSPEC can be:
state diagram
(sequential spec)
activation tables
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 47
Guidelines for Building a CSPEC
list all sensors that are "read" by the software
list all interrupt conditions
list all "switches" that are actuated by the operator
list all data conditions
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 48
Class--Based Modeling
Class
Identify analysis classes by examining the
problem statement
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 49
Analysis Classes
External entities (e.g., other systems, devices, people) that produce or consume
information to be used by a computer-
computer-based system.
Things (e.g, reports, displays, letters, signals) that are part of the information
domain for the problem.
Roles (e.g., manager, engineer, salesperson) played by people who interact with the
system.
Organizational units (e.g., division, group, team) that are relevant to an application.
Places (e.g., manufacturing floor or loading dock) that establish the context of the
problem and the overall function of the system.
Retained information
Needed services
Multiple attributes
Common attributes
Common operations
Essential requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 51
Class Diagram
Class name
System
systemID
verificationPhoneNumber
systemStatus attributes
delayTime
telephoneNumber
masterPassword
temporaryPassword
numberTries
program()
display()
reset()
query() operations
modify()
call()
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 52
Class Diagram
FloorPlan
type
name
outsideDimensions
determineType ( )
positionFloorplan
scale( )
change color( )
is part of
t ype t ype
ID wallDim ensions
locat ion
f ieldV iew
panA ngle
Zoom Set t ing
determineType ( )
det erm ineType ()
computeDimensions ( )
t ranslat eLocat ion ()
displayID()
displayV iew()
displayZoom ()
is used t o build is used t o build
is used t o build
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 54
CRC Modeling
Class:
Class:
Description:
Class:
Description:
Class: FloorPlan
Description:
Responsibility:
Description: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
defines floor plan name/type
manages floor plan positioning
scales floor plan for display
scales floor plan for display
incorporates walls, doors and windows Wall
shows position of video cameras Camera
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 55
Class Types
classes, also called model or business classes, are
Entity classes,
extracted directly from the statement of the problem (e.g.,
FloorPlan and Sensor).
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 56
Responsibilities
(Attributes and methods relevant to the class)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 57
Collaborations
Classes fulfill their responsibilities in one of two ways:
A class can use its own operations to manipulate its own
attributes, thereby fulfilling a particular responsibility, or
a class can collaborate with other classes.
Collaborations identify relationships between classes
Collaborations are identified by determining whether a class
can fulfill each responsibility itself
Three different generic relationships between classes [WIR90]:
the is part-of relationship
is--part-
the has knowledge--of relationship
has--knowledge
the depends
depends--upon relationship
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 58
Composite Aggregate Class
Player
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 59
Reviewing the CRC Model
All participants in the review (of the CRC model) are given a subset of the
CRC model index cards.
Cards that collaborate should be separated (i.e., no reviewer should have two
cards that collaborate).
All use-
use-case scenarios (and corresponding use-
use-case diagrams) should be
organized into categories.
categories.
The review leader reads the use-
use-case deliberately.
deliberately.
As the review leader comes to a named object, she passes a token to the person
holding the corresponding class index card.
When the token is passed, the holder of the class card is asked to describe
the responsibilities noted on the card.
card.
The group determines whether one (or more) of the responsibilities satisfies the
use--case requirement.
use
If the responsibilities and collaborations noted on the index cards cannot
accommodate the use- use-case, modifications are made to the cards
cards..
This may include the definition of new classes (and corresponding CRC index
cards) or the specification of new or revised responsibilities or collaborations on
existing cards.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 60
Associations and Dependencies
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 61
Multiplicity
Wall
1 1 1
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 62
Dependencies
DisplayWindow Camera
<<access>>
{password}
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 63
Analysis Packages
Various elements of the analysis model (e.g., use-
use-cases,
analysis classes) are categorized in a manner that
packages them as a grouping
The plus sign preceding the analysis class name in each
package indicates that the classes have public visibility
and are therefore accessible from other packages.
Other symbols can precede an element within a
package. A minus sign indicates that an element is
hidden from all other packages and a # symbol indicates
that an element is accessible only to packages contained
within a given package.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 64
Analysis Packages
package name
Environment
+Tree
+Landscape
+Road
+Wall
+Bridge
+Building RulesOf TheGame
+VisualEffect
+Scene +RulesOfMovement
+ConstraintsOnAction
Charact ers
+Player
+Protagonist
+Antagonist
+SupportingRole
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 65
Behavioral Modeling
The behavioral model indicates how software will
respond to external events or stimuli. To create the
model, the analyst must perform the following steps:
Evaluate all use-
use-cases to fully understand the sequence of
interaction within the system.
Identify events that drive the interaction sequence and
understand how these events relate to specific objects.
Create a sequence for each use-
use-case.
Build a state diagram for the system.
Review the behavioral model to verify accuracy and
consistency.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 66
State Representations
In the context of behavioral modeling, two different
characterizations of states must be considered:
the state of each class as the system performs its function and
the state of the system as observed from the outside as the
system performs its function
The state of a class takes on both passive and active
characteristics [CHA93].
A passive state is simply the current status of all of an object’s
attributes.
The active state of an object indicates the current status of the
object as it undergoes a continuing transformation or processing.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 67
State Diagram for the ControlPanel Class
t imer < lockedTime
password = incorrect
& numberOfTries < maxTries
select ing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 68
The States of a System
state—a set of observables that
state—
characterizes the behavior of a system at
a given time
state transition—
transition—the movement from one
state to another
event—
event —an occurrence that causes the
system to exhibit some predictable form
of behavior
action—
action —process that occurs as a
consequence of making a transition
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 69
Behavioral Modeling
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 70
Sequence Diagram
ho meo wn er co n t ro l p anel syst em sen
senso
so rs
rs
read in g
syst em A
read y
p assw o rd en t ered
resu lt
select in g
Figure 8 .2 7 Sequence diagram (part ial) f or Saf eHome securit y f unct ion
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 71
Writing the Software Specification
Everyone knew exactly
what had to be done
until someone wrote it
down!
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 72
Specification Guidelines
use a layered format that provides increasing detail
as the "layers" deepen
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 73
Specification Guidelines
Be on the lookout for persuasive connectors, ask why?
keys: certainly, therefore, clearly, obviously, it follows that ...
Watch out for vague terms
keys: some, sometimes, often, usually,ordinarily, most, mostly ...
When lists are given, but not completed, be sure all items are understood
keys: etc., and so forth, and so on, such as
Be sure stated ranges don't contain unstated assumptions
e.g., Valid codes range from 10 to 100. Integer? Real? Hex?
Beware of vague verbs such as handled, rejected, processed, ...
Beware "passive voice" statements
e.g., The parameters are initialized. By what?
Beware "dangling" pronouns
e.g., The I/O module communicated with the data validation module and
its contol flag is set. Whose control flag?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 74
Specification Guidelines
When a term is explicitly defined in one place, try
substituting the definition forother occurrences of the term
When a structure is described in words, draw a picture
Look for statements that imply certainty, then ask for proof
keys; always, every, all, none, never
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 75
Software Engineering: A Practitioner’s Approach, 6/e
Chapter 10
Architectural Design
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
Why Architecture?
The architecture is not the operational software.
Rather, it is a representation that enables a
software engineer to:
(1) analyze the effectiveness of the design in
meeting its stated requirements,
(2) consider architectural alternatives at a stage
when making design changes is still relatively
easy, and
(3) reduce the risks associated with the
construction of the software.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
Why is Architecture
Important?
Representations of software architecture are an enabler for
communication between all parties (stakeholders) interested in the
development of a computer-
computer-based system.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
Data Design
At the architectural level …
Design of one or more databases to support the
application architecture
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Data Design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
Data Design—
Design—Component Level
1. The systematic analysis principles applied to function and
behavior should also be applied to data.
2. All data structures and the operations to be performed on each
should be identified.
3. A data dictionary should be established and used to define both
data and program design.
4. Low level data design decisions should be deferred until late in
the design process.
5. The representation of data structure should be known only to
those modules that must make direct use of the data contained
within the structure.
6. A library of useful data structures and the operations that may be
applied to them should be developed.
7. A software design and programming language should support
the specification and realization of abstract data types.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
Architectural Styles
Each style describes a system category that encompasses: (1) a set of
components (e.g., a database, computational modules) that perform a
function required by a system, (2) a set of connectors that enable
“communication, coordination and cooperation” among components,
(3) constraints that define how components can be integrated to form
the system, and (4) semantic models that enable a designer to
understand the overall properties of a system by analyzing the known
properties of its constituent parts.
Data-centered architectures
Data-
Data flow architectures
Call and return architectures
Object--oriented architectures
Object
Layered architectures
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Data--Centered Architecture
Data
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
Data Flow Architecture
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Call and Return Architecture
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Layered Architecture
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Architectural Patterns
Concurrency — applications must handle multiple tasks in a
manner that enables parallelism
operating system process management pattern
task scheduler pattern
Persistence — Data persists if it survives past the execution of
the process that created it. Two patterns are common:
a database management system pattern that applies the storage and
retrieval capability of a DBMS to the application architecture
an application level persistence pattern that builds persistence
features into the application architecture
Distribution — the manner in which systems or components
within systems communicate with one another in a distributed
environment
A broker acts as a ‘middle-
‘middle-man’ between the client component and a
server component.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
Architectural Design
The software must be placed into context
the design should define the external entities (other systems,
devices, people) that the software interacts with and the nature
of the interaction
A set of architectural archetypes should be identified
An archetype is an abstraction (similar to a class) that
represents one element of system behavior
The designer specifies the structure of the system by
defining and refining software components that
implement each archetype
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Architectural Context
Safehome Internet-based
Product system
control
panel target system: surveillance
Security Function function
uses
homeowner peers
uses
uses
sensors sensors
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
Archetypes
Cont roller
communicat es wit h
Node
Figure 10.7 UML relat ionships f or Saf eHome securit y f unct ion archet ypes
These courseware materials are to(adapt
be used
ed f in
romconjunction
[ BOS00] ) with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15
Component Structure
SafeHome
Execut ive
Funct ion
select ion
Ext ernal
Communicat ion
Management
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Refined Component Structure
SafeHome
Executive
Ext ernal
Communicat ion
Management
Security
GUI Internet
Interface
Co n t ro l d e t e ct o r alarm
p an e l m an ag e m e n t p ro ce ssin g
p ro ce ssin g
Ke y p ad
p ro ce ssin g phone
sch e d u le r
co m m u n icat io n
CP d isp lay
fu n ct io n s
alarm
sennso
se so r
se
se so rr
nso
se
se nnso
sorrr
se nnso r
se n so r
se n so r
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
Analyzing Architectural Design
1. Collect scenarios.
2. Elicit requirements, constraints, and environment
description.
3. Describe the architectural styles/patterns that have been
chosen to address the scenarios and requirements:
• module view
• process view
• data flow view
4. Evaluate quality attributes by considered each attribute
in isolation.
5. Identify the sensitivity of quality attributes to various
architectural attributes for a specific architectural style.
6. Critique candidate architectures (developed in step 3)
using the sensitivity analysis conducted in step 5.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18
An Architectural Design Method
customer requirements
"four bedrooms, three baths,
lots of glass ..."
architectural design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19
Deriving Program Architecture
Program
Architecture
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 20
Partitioning the Architecture
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21
Horizontal Partitioning
define separate branches of the module
hierarchy for each major function
use control modules to coordinate
communication between functions
function 1 function 3
function 2
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22
Vertical Partitioning:
Factoring
workers
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23
Why Partitioned Architecture?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 24
Structured Design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 25
Flow Characteristics
Transform flow
Transaction
flow
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 26
General Mapping Approach
Isolate incoming and outgoing flow
boundaries; for transaction flows, isolate
the transaction center
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 27
Transform Mapping
b g h
a e f
d
c i
j
data flow model
x1 "Transform" mapping
x2 x3 x4
b c d e f g i
a h j
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 28
Factoring
direction of increasing
decision making typical "decision
making" modules
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 29
First Level Factoring
main
program
controller
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 30
Second Level Mapping
main
D
C
control
B A
A
B
C
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 31
Transaction Flow
incoming flow
action path
T
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 32
Transaction Example
fixture setting fixture
servos
commands
operator process
report display
operator
commands screen
robot control
robot
control
software
assembly
record
in reality, other
commands
would also be shown
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 33
Refining the Analysis Model
1. Write an English language processing narrative
for the level 01 flow model
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 34
Deriving Level 1
Processing narrative for " process operator commands"
Process operator command software reads operator commands from
the cell operator. An error message is displayed for invalid commands.
The command type is determined for valid commands and appropriate
action is taken. When fixture commands are encountered, fixture
status is analyzed and a fixture setting is output to the fixture servos.
When a report is selected, the assembly record file is read and a
noun-verb
noun- report is generated and displayed on the operator display screen.
When robot control switches are selected, control values are sent to
parse the robot control system.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 36
Transaction Mapping
e f
a d
b
t i
g
h k
l j
data flow model
m
x1 n
Mapping
b t
a x2 x3 x4
d e f g h x3.1 l m n
i j
k
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 37
Map the Flow Model
process
operator
commands
command determine
input type
controller
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 38
Refining the Structure Chart
process
operator
commands
command determine
input type
controller
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 39
Software Engineering: A Practitioner’s Approach, 6/e
Chapter 13
Software Testing Strategies
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
Software Testing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
What Testing Shows
errors
requirements conformance
performance
an indication
of quality
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
Who Tests the Software?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Testing Strategy
unit test integration
test
system validation
test test
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
Testing Strategy
We begin by ‘testing
‘testing--in-
in-the
the--small’ and move toward
‘testing
testing--in
in--the
the--large’
For OO software:
our focus when “testing in the small” changes from an
individual module (the conventional view) to an OO class
that encompasses attributes and operations and implies
communication and collaboration
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
Strategic Issues
State testing objectives explicitly.
Understand the users of the software and develop a profile for
each user category.
Develop a testing plan that emphasizes “rapid cycle testing.”
Build “robust” software that is designed to test itself.
Use effective formal technical reviews as a filter prior to testing.
Conduct formal technical reviews to assess the test strategy
and test cases themselves.
Develop a continuous improvement approach for the testing
process.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Unit Testing
module
to be
tested
results
software
engineer
test cases
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
Unit Testing
module
to be
tested
interface
local data structures
boundary conditions
independent paths
error handling paths
test cases
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Unit Test Environment
driver
interface
local data structures
Module boundary conditions
independent paths
error handling paths
stub stub
test cases
RESULTS
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Integration Testing Strategies
Options:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Top Down Integration
A
top module is tested with
stubs
B F G
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
Bottom--Up Integration
Bottom
A
B F G
cluster
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Sandwich Testing
A
Top modules are
tested with stubs
B F G
cluster
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
Object--Oriented Testing
Object
Begins by evaluating the correctness and consistency of
the OOA and OOD models
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Testing the CRC Model
1. Revisit the CRC model and the object-
object-relationship model.
2. Inspect the description of each CRC index card to determine if
a delegated responsibility is part of the collaborator’s definition.
3. Invert the connection to ensure that each collaborator that is
asked for service is receiving requests from a reasonable source.
4. Using the inverted connections examined in step 3, determine
whether other classes might be required or whether
responsibilities are properly grouped among the classes.
5. Determine whether widely requested responsibilities might be
combined into a single responsibility.
6. Steps 1 to 5 are applied iteratively to each class and through
each evolution of the OOA model.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
OOT Strategy
Class testing is the equivalent of unit testing:
operations within the class are tested
the state behavior of the class is examined
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18
Smoke Testing
A common approach for creating “daily builds” for product
software
Smoke testing steps:
Software components that have been translated into code are
integrated into a “build.”
A build includes all data files, libraries, reusable modules, and
engineered components that are required to implement one or
more product functions.
A series of tests is designed to expose errors that will keep
the build from properly performing its function.
The intent should be to uncover “show stopper” errors that have
the highest likelihood of throwing the software project behind
schedule.
The build is integrated with other builds and the entire product
(in its current form) is smoke tested daily.
The integration approach may be top down or bottom up.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19
High Order Testing
Validation testing
Focus is on software requirements
System testing
Focus is on system integration
Alpha/Beta testing
Focus is on customer usage
Recovery testing
forces the software to fail in a variety of ways and verifies that
recovery is properly performed
Security testing
verifies that protection mechanisms built into a system will, in fact,
protect it from improper penetration
Stress testing
executes a system in a manner that demands resources in abnormal
quantity, frequency, or volume
Performance Testing
test the run-
run-time performance of software within the context of an
integrated system
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 20
Debugging:
A Diagnostic Process
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21
The Debugging Process
test cases
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22
Debugging Effort
time required
to diagnose the
time required symptom and
to correct the error determine the
and conduct cause
regression tests
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23
Symptoms & Causes
Symptom and cause may be
geographically separated
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 24
Consequences of Bugs
infectious
damage
catastrophic
extreme
serious
disturbing
annoying
mild
Bug Type
Bug Categories: function
function--related bugs,
system--related bugs, data bugs, coding bugs,
system
design bugs, documentation bugs, standards
violations, etc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 25
Debugging Techniques
Backtracking
Induction
Deduction
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 26
Debugging: Final Thoughts
1. Don't run off half-
half-cocked, think about the
symptom you're seeing.
2. Use tools (e.g., dynamic debugger) to gain
more insight.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 27
Software Engineering: A Practitioner’s Approach, 6/e
Chapter 14
Software Testing Techniques
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
Testability
Operability—it operates cleanly
Operability—
Observability—
Observability —the results of each test case are readily
observed
Controllability—
Controllability—the degree to which testing can be automated
and optimized
Decomposability—
Decomposability —testing can be targeted
Simplicity—
Simplicity—reduce complex architecture and logic to simplify
tests
Stability—
Stability—few changes are requested during testing
Understandability—
Understandability —of the design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
What is a “Good” Test?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
Test Case Design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Exhaustive Testing
loop < 20 X
14
There are 10 possible paths! If we execute one
test per millisecond, it would take 3,170 years to
test this program!!
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
Selective Testing
Selected path
loop < 20 X
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
Software Testing
white-box black-box
methods methods
Methods
Strategies
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
White--Box Testing
White
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8
Why Cover?
logic errors and incorrect assumptions
are inversely proportional to a path's
execution probability
we oftenbelievethat
believe that a path is not
likely to be executed; in fact, reality is
often counter intuitive
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9
Basis Path Testing
First, we compute the cyclomatic
complexity:
or
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Cyclomatic Complexity
A number of industry studies have indicated
that the higher V(G), the higher the probability
or errors.
modules
V(G)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Basis Path Testing
Next, we derive the
independent paths:
1
Since V(G) = 4,
2 there are four paths
3 Path 1: 1,2,3,6,7,8
4
5 6 Path 2: 1,2,3,5,7,8
Path 3: 1,2,4,7,8
Path 4: 1,2,4,7,2,4,...7,8
7
Finally, we derive test
cases to exercise these
8
paths.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12
Basis Path Testing Notes
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13
Graph Matrices
A graph matrix is a square matrix whose size
(i.e., number of rows and columns) is equal to
the number of nodes on a flow graph
Each row and column corresponds to an
identified node, and matrix entries correspond to
connections (an edge) between nodes.
By adding a link weight to each matrix entry, the
graph matrix can become a powerful tool for
evaluating program control structure during
testing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14
Control Structure Testing
Condition testing — a test case design method that
exercises the logical conditions contained in a program
module
Data flow testing — selects test paths of a program
according to the locations of definitions and uses of
variables in the program
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15
Loop Testing
Simple
loop
Nested
Loops
Concatenated
Loops Unstructured
Loops
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Loop Testing: Simple Loops
Minimum conditions—
conditions—Simple Loops
1. skip the loop entirely
2. only one pass through the loop
3. two passes through the loop
4. m passes through the loop m < n
5. (n-
(n-1), n, and (n+1) passes through
the loop
where n is the maximum number
of allowable passes
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
Loop Testing: Nested Loops
Nested Loops
Start at the innermost loop. Set all outer loops to their
minimum iteration parameter values.
Test the min+1, typical, max-
max-1 and max for the
innermost loop, while holding the outer loops at their
minimum values.
Move out one loop and set it up as in step 2, holding all
other loops at typical values. Continue this step until
the outermost loop has been tested.
Concatenated Loops
If the loops are independent of one another
then treat each as a simple loop
else* treat as nested loops
endif*
for example, the final loop counter value of loop 1 is
used to initialize loop 2.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18
Black--Box Testing
Black
requirements
output
input events
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19
Black--Box Testing
Black
How is functional validity tested?
How is system behavior and performance tested?
What classes of input will make good test cases?
Is the system particularly sensitive to certain input
values?
How are the boundaries of a data class isolated?
What data rates and data volume can the system
tolerate?
What effect will specific combinations of data have
on system operation?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 20
Graph--Based Methods
Graph
To understand the
object Directed link object
objects that are #1 (link weight) #2
modeled in
Node weight
software and the Undirected link
(value
)
relationships that object
Parallel links
#
connect these 3
objects (a)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21
Equivalence Partitioning
user output FK
queries formats input
mouse
picks data
prompts
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22
Sample Equivalence
Classes
Valid data
user supplied commands
responses to system prompts
file names
computational data
physical parameters
bounding values
initiation values
output data formatting
responses to error messages
graphical data (e.g., mouse picks)
Invalid data
data outside bounds of the program
physically impossible data
proper value supplied in wrong place
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23
Boundary Value Analysis
user output FK
queries formats input
mouse data
picks prompts
output
input domain domain
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 24
Comparison Testing
Used only in situations in which the reliability of software
is absolutely critical (e.g., human-
human-rated systems)
Separate software engineering teams develop independent
versions of an application using the same specification
Each version can be tested with the same test data to ensure
that all provide identical output
Then all versions are executed in parallel with real-
real-time
comparison of results to ensure consistency
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 25
Orthogonal Array Testing
Used when the number of input parameters is small and
the values that each of the parameters may take are
clearly bounded
Z Z
Y Y
X X
One input item at a time L9 orthogonal array
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 26
OOT—
OOT—Test Case Design
Berard [BER93] proposes the following approach:
1. Each test case should be uniquely identified and should be explicitly
associated with the class to be tested,
2. The purpose of the test should be stated,
3. A list of testing steps should be developed for each test and should
contain [BER94]:
a. a list of specified states for the object that is to be tested
b. a list of messages and operations that will be exercised as
a consequence of the test
c. a list of exceptions that may occur as the object is tested
d. a list of external conditions (i.e., changes in the environment external
to the software that must exist in order to properly conduct the test)
e. supplementary information that will aid in understanding or
implementing the test.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 27
Testing Methods
Fault--based testing
Fault
The tester looks for plausible faults (i.e., aspects of the implementation of the
system that may result in defects). To determine whether these faults exist, test
cases are designed to exercise the design or code.
Class Testing and the Class Hierarchy
Inheritance does not obviate the need for thorough testing of all derived classes.
In fact, it can actually complicate the testing process.
Scenario--Based Test Design
Scenario
Scenario-based testing concentrates on what the user does, not what the
Scenario-
product does. This means capturing the tasks (via use-
use-cases) that the user has
to perform, then applying them and their variants as tests.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 28
OOT Methods: Random Testing
Random testing
identify operations applicable to a class
define constraints on their use
identify a miminum test sequence
an operation sequence that defines the minimum life
history of the class (object)
generate a variety of random (but valid) test sequences
exercise other (more complex) class instance life
histories
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 29
OOT Methods: Partition Testing
Partition Testing
reduces the number of test cases required to test a class in
much the same way as equivalence partitioning for
conventional software
state--based partitioning
state
categorize and test operations based on their ability to change
the state of a class
attribute--based partitioning
attribute
categorize and test operations based on the attributes that they
use
category--based partitioning
category
categorize and test operations based on the generic function
each performs
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 30
OOT Methods: Inter-
Inter-Class Testing
Inter--class testing
Inter
For each client class, use the list of class operators to
generate a series of random test sequences. The operators
will send messages to other server classes.
For each message that is generated, determine the
collaborator class and the corresponding operator in the
server object.
For each operator in the server object (that has been invoked
by messages sent from the client object), determine the
messages that it transmits.
For each of the messages, determine the next level of
operators that are invoked and incorporate these into the test
sequence
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 31
OOT Methods: Behavior Testing
The tests to be empty set up
designed should open acct setup Accnt acct
operation working
sequences should balance
acct
withdraw
cause the credit
accntInfo
Account class to withdrawal
make transition (final)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 32
Testing Patterns
Pattern name: pair testing
Abstract: A process-
process-oriented pattern, pair testing describes a technique that is
analogous to pair programming (Chapter 4) in which two testers work together
to design and execute a series of tests that can be applied to unit, integration
or validation testing activities.
Pattern name: separate test interface
Abstract: There is a need to test every class in an object-
object-oriented system,
including “internal classes” (i.e., classes that do not expose any interface
outside of the component that used them). The separate test interface pattern
describes how to create “a test interface that can be used to describe specific
tests on classes that are visible only internally to a component.” [LAN01]
Pattern name: scenario testing
Abstract: Once unit and integration tests have been conducted, there is a need
to determine whether the software will perform in a manner that satisfies users.
The scenario testing pattern describes a technique for exercising the software
from the user’s point of view. A failure at this level indicates that the software
has failed to meet a user visible requirement. [KAN01]
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 33
Software Engineering: A Practitioner’s Approach, 6/e
Chapter 26
Quality Managementcopyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
1
Quality
The American Heritage Dictionary defines quality as
“a characteristic or attribute of something.”
For software, two kinds of quality may be encountered:
Quality of design encompasses requirements, specifications,
and the design of the system.
Quality of conformance is an issue focused primarily on
implementation.
user satisfaction = compliant product + good quality + delivery
within budget and schedule
2
Software Quality
3
Cost of Quality
Prevention costs include
quality planning, formal technical reviews, test equipment
and Training
Appraisal costs include
In-process and inter-
In- inter-process inspection, equipment
calibration and maintenance, and testing
Failure costs
Internal failure costs (before delivery) include
rework
repair
failure mode analysis
External failure costs (after delivery) include
complaint resolution
product return and replacement
help line support
warranty work
4
Software Quality Assurance
Process Formal
Definition & Technical
Standards Reviews
Analysis
& Test
Reporting Planning
& Review
Measurement
5
Role of the SQA Group-
Group-I
Prepares an SQA plan for a project.
The plan identifies
evaluations to be performed
audits and reviews to be performed
standards that are applicable to the project
procedures for error reporting and tracking
documents to be produced by the SQA group
amount of feedback provided to the software project team
6
Role of the SQA Group-
Group-II
Reviews software engineering activities to verify compliance with the
defined software process.
identifies, documents, and tracks deviations from the process and verifies that
corrections have been made.
3.00
1.50
1.00
1 0.75
8
Reviews & Inspections
9
What Are Reviews?
a meeting conducted by technical people for
technical people
a technical assessment of a work product
created during the software engineering
process
a software quality assurance mechanism
a training ground
Reviews serve to uncover errors and defects that can then be removed
at various points during software engineering. 10
The Players
review
leader standards bearer (SQA)
producer
maintenance
oracle
recorder reviewer
user rep
11
Conducting the Review
1. be prepared—
prepared—evaluate
product before the review
13
Review Guidelines
Review the product, not the producer
Set an agenda and maintain it
Limit debate and rebuttal
Enunciate problem areas, but don’t attempt to solve every
problem noted
Take written notes
Limit the number of participants and insist upon advance
preparation
…
14
Defect Amplification and Removal
Figure 26.2
Errors passed through
Amplified errors 1: x
Newly generated errors
Figure 26.3
no reviews are conducted
Figure 26.4
reviews are conducted (preliminary design, detail design, code)
15
Sample--Driven Reviews (SDRs)
Sample
SDRs attempt to quantify those work products that are primary targets for
full FTRs.
To accomplish this …
Inspect a fraction ai of each software work product, Record the number
of faults fi found within ai.
Develop a gross estimate of the number of faults within work product i
by multiplying fi by 1/ai.
Sort the work products in descending order according to the gross
estimate of the number of faults in each.
Focus available review resources on those work products that have the
highest estimated number of faults.
16
Metrics Derived from Reviews
inspection time per page of documentation
inspection time per KLOC or FP
inspection effort per KLOC or FP
errors uncovered per reviewer hour
errors uncovered per preparation hour
errors uncovered per SE task (e.g., design)
number of minor errors (e.g., typos)
number of major errors
(e.g., nonconformance to req.)
number of errors found during preparation
17
Statistical SQA
measurement
18
An Example
Figure 26.5
The causes of errors, number of errors be found, percentage
19
Six
Six--Sigma for Software Engineering
The term “six sigma” is derived from six standard deviations—
deviations—3.4 instances
(defects) per million occurrences—
occurrences—implying an extremely high quality
standard.
The Six Sigma methodology defines three core steps:
Define customer requirements and deliverables and project goals via well-
well-
defined methods of customer communication
Measure the existing process and its output to determine current quality
performance (collect defect metrics)
Analyze defect metrics and determine the vital few causes.
20
Software Reliability
A simple measure of reliability is mean
mean--time
time--between
between--
failure (MTBF), where
MTBF = MTTF + MTTR
MTBF
21
Software Availability
Software availability is the probability that a program is
operating according to requirements at a given point in
time and is defined as
Availability = [MTTF/(MTTF + MTTR)] x 100%
22
Software Safety
Software safety is a software quality assurance activity
that focuses on the identification and assessment of
potential hazards that may affect software negatively and
cause an entire system to fail.
If hazards can be identified early in the software process,
software design features can be specified that will either
eliminate or control potential hazards.
23
ISO 9001:2000 Standard
ISO 9001:2000 is the quality assurance standard that
applies to software engineering.
The standard contains 20 requirements that must be
present for an effective quality assurance system.
The requirements delineated by ISO 9001:2000 address
topics such as
management responsibility, quality system, contract review,
design control, document and data control, product identification
and traceability, process control, inspection and testing,
corrective and preventive action, control of quality records,
internal quality audits, training, servicing, and statistical
techniques.
24
Software Engineering: A Practitioner’s Approach, 6/e
Chapter 27
Change Management copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
1
The “First Law”
2
Software Configuration Management, SCM
Identify change
Control change
Ensure that change is being properly implemented
Report changes to others who may have an interest
3
What Are These Changes?
changes in
business requirements
changes in
technical requirements
changes in
user requirements other
documents
software models
Project
Plan
data
Test
code
4
The Software Configuration
programs documents
6
Baselines
modified
SCIs
Project database
approved
Software Formal
engineering SCIs technical SCIs
tasks reviews
stored
SCIs
extracted
SCM
SCIs
controls
BASELINES:
System Specification
Software Requirements
Design Specification
Source Code
Test Plans/Procedures/Data
Operational System
Figure 27.1
7
Software Configuration Objects
Data model
Design specification
data design
architectural design
module design
interface design
Component N
interface description
algorithm description
Test specification PDL
test plan
test procedure
test cases
Source code
Figure 27.2
8
SCM Repository
The SCM repository is the set of mechanisms and data
structures that allow a software team to manage change
in an effective manner
The repository performs or precipitates the following
functions [FOR89]:
Data integrity
Information sharing
Tool integration
Data integration
Methodology enforcement
Document standardization
9
Repository Content
u se -case s
b u sin e ss ru le s an aly sis m o d e l so u rce co d e
b u sin e ss fu n ct io n s sce n ario -b ase d d iag ram s o b j e ct co d e
o rg an izat io n st ru ct u re flo w -o rie n t e d d iag ram s sy st e m b u ild in st ru ct io n s
in fo rm at io n arch it e ct u re class-b ase d d iag ram s
b e h av io ral d iag ram s Const ruct ion
d e sig n m o d e l Cont ent
arch it e ct u ral d iag ram s
Business in t e rface d iag ram s
Cont ent co m p o n e n t -le v e l d iag ram s
t e ch n ical m e t rics t e st case s
t e st scrip t s
t e st re su lt s
q u alit y m e t rics
Model
Cont ent
V&V
Cont ent
Project
Management
p ro j e ct e st im at e s Cont ent
p ro j e ct sch e d u le
SCM re q u ire m e n t s
Pro je ct Plan
ch an g e re q u e st s Document s SCM/ SQA Plan
ch an g e re p o rt s
Sy st e m Sp e c
SQA re q u ire m e n t s
Re q u ire m e n t s Sp e c
p ro j e ct re p o rt s/ au d it re p o rt s
De sig n Do cu m e n t
p ro j e ct m e t rics
Te st Plan an d Pro ce d u re
Su p p o rt d o cu m e n t s
Use r m an u al
Figure 27.3 10
Repository Features
Versioning.
saves all of these versions to enable effective management of product
releases and to permit developers to go back to previous versions
Dependency tracking and change management.
The repository manages a wide variety of relationships among the data
elements stored in it.
Requirements tracing.
Provides the ability to track all the design and construction components
and deliverables that result from a specific requirement specification
Configuration management.
Keeps track of a series of configurations representing specific project
milestones or production releases. Version management provides the
needed versions, and link management keeps track of
interdependencies.
Audit trails.
establishes additional information about when, why, and by whom
11
changes are made.
SCM Elements
Component elements—
elements—a set of tools coupled within a file management
system (e.g., a database) that enables access to and management of each
software configuration item.
Process elements—
elements—a collection of procedures and tasks that define an
effective approach to change management (and related activities) for all
constituencies involved in the management, engineering and use of
computer software.
Construction elements—
elements—a set of tools that automate the construction of
software by ensuring that the proper set of validated components (i.e., the
correct version) have been assembled.
Human elements—
elements—to implement effective SCM, the software team uses a
set of tools and process features (encompassing other CM elements)
12
The SCM Process
Addresses the following questions …
How does a software team identify the discrete elements of a software
configuration?
How does an organization manage the many existing versions of a program
(and its documentation) in a manner that will enable change to be
accommodated efficiently?
How does an organization control changes before and after software is
released to a customer?
Who has responsibility for approving and ranking changes?
How can we ensure that changes have been made properly?
What mechanism is used to appraise others of changes that are made?
13
The SCM Process
Software
Vm.n
reporting
configuration auditing
version control
change control
identification
SCIs
14
Version Control
Version control combines procedures and tools to manage different
versions of configuration objects that are created during the software
process
A version control system implements or is directly integrated with four major
capabilities:
a project database (repository) that stores all relevant configuration objects
a version management capability that stores all versions of a configuration
object (or enables any version to be constructed using differences from past
versions);
a make facility that enables the software engineer to collect all relevant
configuration objects and construct a specific version of the software.
an issues tracking (also called bug tracking)
tracking) capability that enables the team to
record and track the status of all outstanding issues associated with each
configuration object.
15
Change Control
STOP
16
Change Control Process—
Process—I
need for change is recognized
developer evaluates
17
Change Control Process-
Process-II
assign people to SCIs
check--out SCIs
check
18
Change Control Process-
Process-III
perform SQA and testing activities
19
Auditing
Change
Requests SQA
Plan
SCIs
SCM Audit
20
Status Accounting
Change Change
Requests Reports ECOs
SCIs
Status Accounting
Reporting
Engineering Change Order, ECO, for 21
each approved change
SCM for Web Engineering-
Engineering-I
Content.
A typical WebApp contains a vast array of content—text,
graphics, applets, scripts, audio/video files, forms, active page
elements, tables, streaming data, and many others.
The challenge is to organize this set of content into a rational set
of configuration objects (Section 27.1.4) and then establish
appropriate configuration control mechanisms for these objects.
People.
Because a significant percentage of WebApp development
continues to be conducted in an ad hoc manner, any person
involved in the WebApp can (and often does) create content.
22
SCM for Web Engineering-
Engineering-II
Scalability.
As size and complexity grow, small changes can have far-
far-reaching and
unintended affects that can be problematic. Therefore, the rigor of
configuration control mechanisms should be directly proportional to
application scale.
Politics.
Who ‘owns’ a WebApp?
Who assumes responsibility for the accuracy of the information on the
Web site?
Who assures that quality control processes have been followed before
information is published to the site?
Who is responsible for making changes?
Who assumes the cost of change?
23
Content Management-
Management-I
The collection subsystem encompasses all actions required to create and/or
acquire content, and the technical functions that are necessary to
convert content into a form that can be represented by a mark-
mark-up language (e.g.,
HTML, XML
organize content into packets that can be displayed effectively on the client-
client-side.
The management subsystem implements a repository that encompasses the
following elements:
Content database—
database—the information structure that has been established to store all
content objects
Database capabilities—
capabilities—functions that enable the CMS to search for specific content
objects (or categories of objects), store and retrieve objects, and manage the file
structure that has been established for the content
Configuration management functions—
functions—the functional elements and associated
workflow that support content object identification, version control, change
management, change auditing, and reporting.
24
Content Management-
Management-II
The publishing subsystem extracts from the repository, converts
it to a form that is amenable to publication, and formats it so that it
can be transmitted to client-
client-side browsers. The publishing
subsystem accomplishes these tasks using a series of templates.
Each template is a function that builds a publication using one of
three different components [BOI02]:
Static elements—
elements—text, graphics, media, and scripts that require no
further processing are transmitted directly to the client-
client-side
Publication services—
services—function calls to specific retrieval and formatting
services that personalize content (using predefined rules), perform data
conversion, and build appropriate navigation links.
External services—
services—provide access to external corporate information
infrastructure such as enterprise data or “back-
“back-room” applications.
25
Content Management
t emplat es
server-side
26
Change Management for WebApps-
WebApps-I
classify t he
request ed change
acquire relat ed object s dev elop brief writ t en dev elop brief writ t en
descript ion of change descript ion of change
assess impact of change
27
Change Management for WebApps-
WebApps-II
make changes
design, const ruct , t est
check in object ( s)
t hat were changed
publish t o WebA pp
28