Chapter 2 – Software Processes
Chapter
2
So-ware
Processes
1
Topics covered
² Process activities
² Software process models
² Coping with change
² The Rational Unified Process
§ An example of a modern software process.
Chapter
2
So-ware
Processes
2
The software process
² A structured set of activities required to develop a
software system.
² Many different software processes but all involve:
§
§
§
§
Specification
Design and implementation
Validation
Evolution
Chapter
2
So-ware
Processes
3
Software specification
² The process of establishing
§ what services are required
§ and the constraints on the system’s operation and development.
Chapter
2
So-ware
Processes
4
The requirements engineering process
Feasibility
study
Requirements
elicitation and
analysis
Requirements
specification
Requirements
validation
Feasibility
report
System
models
User and system
requirements
Requirements
document
Chapter
2
So-ware
Processes
5
Chapter
2
So-ware
Processes
6
System models
Chapter
2
So-ware
Processes
7
Software design and implementation
² The process of converting the system specification into
an executable system.
Đ Software design
ã Design a software structure that realises the specification;
Đ Implementation
ã Translate this structure into an executable program;
² The activities of design and implementation are closely
related and may be interleaved.
Chapter
2
So-ware
Processes
8
A general model of the design process
Design inputs
Platform
information
Data
description
Requirements
specification
Design activities
Architectural
design
Interface
design
Component
design
Database design
Design outputs
System
architecture
Database
specification
Interface
specification
Chapter
2
So-ware
Processes
Component
specification
9
Design activities
² Architectural design: identify the overall structure, the
principal components, their relationships and how they
are distributed.
² Interface design: define the interfaces between system
components.
² Component design: take each system component and
design how it will operate.
² Database design: design the system data structures
and how these are to be represented in a database.
Chapter
2
So-ware
Processes
10
Implementation
² Programming is a personal activity and there is no
general process that is usually followed.
² The development of a program to implement the system
follows naturally from the system design processes.
² Programmers carry out some testing of the code to
reveal program defects that must be removed from the
program. This is called debugging.
Chapter
2
So-ware
Processes
11
Software validation
² Verification and validation (V & V) is intended to show
that a system conforms to its specification and meets
the requirements of the system customer.
² Involves checking and review processes and system
testing.
² System testing involves executing the system with test
cases that are derived from the specification of the real
data to be processed by the system.
² Testing is the most commonly used V & V activity.
Chapter
2
So-ware
Processes
12
Stages of testing
Component
testing
System testing
Chapter
2
So-ware
Processes
Acceptance
testing
13
Write unit tests with JUnit
Class
and
method
•
Test
case
public
class
Person
{
private
String
firstName;
private
String
lastName;
public
Person(String
firstName,
String
lastName)
{
if
(firstName
==
null
&&
lastName
==
null)
{
throw
new
IllegalArgumentExcepPon("Both
names
cannot
be
null");
}
this.firstName
=
firstName;
this.lastName
=
lastName;
}
public
String
getFullName()
{
String
first
=
(this.firstName
!=
null)
?
this.firstName
:
"?";
String
last
=
(this.lastName
!=
null)
?
this.lastName
:
"?";
return
first
+
last;
}
•
•
import
junit.framework.TestCase;
public
class
TestPerson
extends
TestCase
{
public
TestPerson(String
name)
{
super(name);
}
/**
Confirm
that
the
name
is
shown
in
correct
forma`ed?
*
*/
public
void
testGetFullName()
{
Person
p
=
new
Person("Aidan",
"Burke");
assertEquals("Aidan
Burke",
p.getFullName());
}
Chapter
2
So-ware
Processes
14
Testing stages
² Development or component testing
§ Individual components are tested independently;
§ Components may be functions or objects or coherent groupings
of these entities.
² System testing
§ Testing of the system as a whole. Testing of emergent properties
is particularly important.
² Acceptance testing
§ Testing with customer data to check that the system meets the
customer’s needs.
Chapter
2
So-ware
Processes
15
Software evolution
² Software is inherently flexible and can change.
² As requirements change through changing business
circumstances, the software that supports the business
must also evolve and change.
² Although there has been a demarcation between
development and evolution (maintenance) this is
increasingly irrelevant as fewer and fewer systems are
completely new.
Chapter
2
So-ware
Processes
16
System evolution
Define system
requirements
Assess existing
systems
Propose system
changes
Existing
systems
Chapter
2
So-ware
Processes
Modify
systems
New
system
17
Process activities
² Real software processes are inter-leaved sequences of
§ Technical activites
§ Collaborative activities
§ Managerial activities
Chapter
2
So-ware
Processes
18
Testing phases in a plan-driven software
process
Requirements
specification
System
specification
System
integration
test plan
Acceptance
test plan
Service
System
design
Acceptance
test
Detailed
design
Sub-system
integration
test plan
System
integration test
Chapter
2
So-ware
Processes
Module and
unit code
and test
Sub-system
integration test
19
Software process descriptions
² Usually includes
§ Activities ( specifying a data model, designing a user interface,
etc.)
§ Ordering of these activities.
² Also include:
§ Products
§ Roles
§ Pre- and post-conditions,
Chapter
2
So-ware
Processes
20
Software process model
² A software process model is an abstract representation
of a process. It presents a description of a process from
some particular perspective.
² For example: from an architectural perspective. That
is, we see the framework of the process but not the
details of specific activities (waterfall model, incremental
development)
Chapter
2
So-ware
Processes
21
Plan-driven and agile processes
² Plan-driven processes are processes where all of the
process activities are planned in advance and progress
is measured against this plan.
² In agile processes, planning is incremental and it is
easier to change the process to reflect changing
customer requirements.
² In practice, most practical processes include elements of
both plan-driven and agile approaches.
² There are no right or wrong software processes.
Chapter
2
So-ware
Processes
22
Software process models
² The waterfall model
§ Plan-driven model. Separate and distinct phases of specification
and development.
² Incremental development
§ Specification, development and validation are interleaved. May
be plan-driven or agile.
² Reuse-oriented software engineering
§ The system is assembled from existing components. May be
plan-driven or agile.
² In practice, most large systems are developed using a
process that incorporates elements from all of these
models.
Chapter
2
So-ware
Processes
23
The waterfall model
Requirements
definition
System and
software design
Implementation
and unit testing
Integration and
system testing
Operation and
maintenance
Chapter
2
So-ware
Processes
24
Waterfall model phases
² There are (5) separate identified phases in the waterfall
model:
§
§
§
§
§
Requirements analysis and definition
System and software design
Implementation and unit testing
Integration and system testing
Operation and maintenance
² In principle, a phase has to be complete before moving
onto the next phase.
Chapter
2
So-ware
Processes
25