x refers to the
mean of the x values (read as x bar)
Note: the data must first be quoted
in the same units as one another; i.e.
do not mix minutes with seconds or
hours
NCC Education Limited, 2007
Mathematics for Computing - 2.28
V2 . 0
28
The Median
Example: Take 14 values, arranged in order of magnitude:
10900 11600 12500 12700 13400 13800 14100 15700 16200
17200 17700 17800 18700 19000
The median is way, i.e. between 7
th
and 8
th value
(14100 + 15700) = 14900, which is more easily found than
the mean and it is not so affected by extreme values
The median of the seven items below, is 8:
3 4 7 8 12 15 8164
it is exactly the same as the median of the seven items:
3 4 7 8 12 15 17
Disadvantage is that the value of the median does not at all
reflect the values of anything but the middle term(s) in a
data set, whereas the mean is affected by each value
NCC Education Limited, 2007
Mathematics for Computing - 2.29
V2 . 0
29
Language Used Frequency
FORTRAN
C
JAVA
VISUAL BASIC
C++
SQL
24
43
8
16
14
1
The Mode
The mode is defined to be the
value which appears most
commonly in a list of data items
especially well suited to data
which is qualitative
In the table shown, the popularity
of a number of different
programming languages was
investigated
if two values appear with equal
frequency, both are classified as
the modes and the distribution is
referred to as bimodal
Ease of determination - may be
used for planning purposes
The mode is therefore C
NCC Education Limited, 2007
Mathematics for Computing - 2.30
V2 . 0
30
Frequency Distribution
Frequency Distribution of Repeat
Purchases with a Loyalty Card
0
20
40
60
80
0 1 2 3 4 5 6 7 8
NCC Education Limited, 2007
Mathematics for Computing - 2.31
V2 . 0
31
Relative
Frequency
Distribution
Relative Frequency Distribution of PC Ages
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
0.45
1 2 3 4 5 6
Department A
Department B
Age of PC 1 2 3 4 5 6 Total
Department A 16 10 8 4 2 1 41
Relative Frequency 0.39 0.24 0.20 0.10 0.05 0.02 1
Department B 5 3 3 3 2 1 17
Relative Frequency 0.29 0.18 0.18 0.18 0.12 0.06 1
NCC Education Limited, 2007
Mathematics for Computing - 2.32
V2 . 0
32
Measures of Spread
2
4
6
8
10
12
14
16
18
20
A
D
0
0.5
1
1.5
2
2.5
3
Three Frequency Distributions
A
B
C
D
NCC Education Limited, 2007
Mathematics for Computing - 2.33
V2 . 0
33
Distribution Range
A 6
B 6
C 14
D 6
The Range
The range is the
simplest measure of
dispersion
found for any distribution
by subtracting the
smallest data value in the
distribution from the
largest
NCC Education Limited, 2007
Mathematics for Computing - 2.34
V2 . 0
34
Standard Deviation
The features that we require of a good measure of dispersion
are
that every data value is taken into account
that data values are weighted according to their
frequency
The standard deviation satisfies these criteria. In
mathematical terms this is shown as:
=
n
i
i
n
x x
1
2
1
) (
NCC Education Limited, 2007
Mathematics for Computing - 2.35
V2 . 0
35
Probabilities - Definitions
Sample space the sample space is defined as the
set of all possible outcomes of an experiment
Event each possible outcome of an experiment is
a sample point; a collection of sample points with a
common property is an event
Probability the probability of a sample point is the
proportion of occurrences of the sample point in a
long series of experiments
NCC Education Limited, 2007
Mathematics for Computing - 2.36
V2 . 0
36
Relative Frequency
Definitions and Probability
Relative frequency measures the way in which one
particular category occupies the distribution as a
whole and in what proportion
Example
How likely is it, that a piece of equipment chosen at
random from Workshop W8, will be between 4 and 5 years
old?
We could view the result as a measure of the probability
that the age of the equipment lies between those limits
NCC Education Limited, 2007
Mathematics for Computing - 2.37
V2 . 0
37
Summary
We have covered a range of basic mathematical
techniques
The ability to use and understand numbers in any of
the common bases such as decimal, binary, octal
and hexadecimal is frequently needed in system
development activities
There are other mathematical topics, for example
sets, logic, and particularly for graphics, matrix
manipulation. These topics are not required at the
level of study for this module
NCC Education Limited, 2007
System Development Life Cycles - 3.1
V2.0
International Diploma in
Computer Studies
Systems Development
System Development Life Cycles
NCC Education Limited, 2007
System Development Life Cycles - 3.2
V2.0
Contents
Software engineering
Project stages and
project control
The Waterfall life cycle
model
The V model
Velotec training system
history
Prototyping
Velotec product data
management system
Rapid application
development
The Spiral life cycle
model
NCC Education Limited, 2007
System Development Life Cycles - 3.3
V2.0
Introduction
This chapter will give a brief overview of:
history of software development leading to it becoming an
engineering discipline
size and complexity issues
quality and productivity
Project stages and control
System Development Life Cycles (SDLC)
NCC Education Limited, 2007
System Development Life Cycles - 3.4
V2.0
Software Engineering
Software engineering originated in 1968
in response to the software crisis
Need to regard software development as
software engineering (disciplined and
structured)
Regarding software development as a
craft causes problems
NCC Education Limited, 2007
System Development Life Cycles - 3.5
V2.0
Software Engineering
Definitions
Software engineering is an engineering discipline,
using a systematic and organised approach
(including theories, methods and tools) which is
concerned with all aspects of software production
from the early stages of systems specification
through to maintaining the system after it has gone
into use
Source: Ian Sommerville (2006) Software Engineering 8
th
Ed,
Addison Wesley ISBN - 0321313798
NCC Education Limited, 2007
System Development Life Cycles - 3.6
V2.0
Producing Software is Difficult
Large software systems are the most complex products that
man has ever produced
Some of the most complex products include ships, large
aircraft, cars, worlds tallest buildings, worlds longest
bridges
Small increases in the complexity of a system can mean the
difficulty of production increases almost vertically
Software is intangible (cannot see it)
Software is not subject to well-understood physical laws
NCC Education Limited, 2007
System Development Life Cycles - 3.7
V2.0
D
i
f
f
i
c
u
l
t
y
o
f
p
r
o
d
u
c
t
i
o
n
Complexity of product
System Complexity
NCC Education Limited, 2007
System Development Life Cycles - 3.8
V2.0
Size is Important
Reasons why scaling does not work:
The complexity of a computer system does not
increase linearly with size measured in lines of
program code
The idea that adding more resources to a project
will allow it to be completed more quickly seems
reasonable
in fact adding resources to a project in order to reduce the time needed for
completion usually has exactly the opposite effect - it extends the entire
project duration
NCC Education Limited, 2007
System Development Life Cycles - 3.9
V2.0
Quality
We expect that a consumer durable ( razor, hairdryer,
cell phone, TV, car etc) from a well-known supplier
will function well for its entire lifespan
Unfortunately, this is not the normal expectation for
software
Recall the many software failures you read about
The level of quality we obtain from software products
is not the same as we expect from other products
Why is this?
NCC Education Limited, 2007
System Development Life Cycles - 3.10
V2.0
Productivity
Productivity is the amount of useful output
produced per hour
The productivity of two people using the same tools
and process is often quite different
Studies of programmer productivity (same tasks
with the same tools) showed a variation between
programmers of at least 16:1
Would any other industry accept such a large variation?
NCC Education Limited, 2007
System Development Life Cycles - 3.11
V2.0
Programmer Productivity
Studies of activity vary from one organisation to
another; the following was not unusual:
Programming 13%
Reading programs and manuals 16%
Job communication 32%
Personal 13%
Miscellaneous 15%
Training 6%
Mail 5%
NCC Education Limited, 2007
System Development Life Cycles - 3.12
V2.0
Project Stages and Project
Control
Brief Overview of Stages
Strategic study
Business study
Feasibility study
Requirements analysis
Requirements
specification
Logical systems
specifications
Logical design
Physical design
Coding
Testing
Implementation
Maintenance
Phase out
NCC Education Limited, 2007
System Development Life Cycles - 3.13
V2.0
The Waterfall Life Cycle
Requirements
Analysis
Requirements
Specification
System Design
Code and Test
Maintenance
Implement
NCC Education Limited, 2007
System Development Life Cycles - 3.14
V2.0
The Waterfall Life Cycle -
Assumptions
It is possible to divide project activities into
discrete, isolated stages
Each stage is completed before the next one is
started
Each stage relies on the information produced by
the previous stage, and only on that stage
A project plan can be constructed, based on
milestones, represented by the completion of each
stage
NCC Education Limited, 2007
System Development Life Cycles - 3.15
V2.0
Problems with the
Waterfall Model
Assumes that all of the system is developed at the same time
Project activities not as clearly defined and discrete as the model implies
Sometimes it is necessary to repeat a group of project stages in order to
fully understand or complete an aspect of the system
There is a relationship between stages that are not next to each other in
the waterfall, but this is not apparent from the model
The involvement and exposure of the system to the owning business
managers is not clear from the model
Focuses strongly on the activities that are performed at each stage
NCC Education Limited, 2007
System Development Life Cycles - 3.16
V2.0
The V Model
Tested modules
System design
Requirements
specification
Acceptance test
Maintenance
Tested
system
Integration and test
Code and unit test
Initial concept
Software design
Requirements definition
Detailed design
Tested software
Tested system
Tested software
Tested
modules
Module design
NCC Education Limited, 2007
System Development Life Cycles - 3.17
V2.0
Velotec Training System
History
Staff need correct training and their skills need to be
monitored; for review against any potential new
project
All training organised by Human Resources (HR)
and carried out by specialist training companies
HR Director commissioned a training tracking
system
Two major issues
Dynamic requirements
Reluctance to accept design
NCC Education Limited, 2007
System Development Life Cycles - 3.18
V2.0
Benefits of Prototypes
Any misunderstanding between business managers
and analysts quickly resolved
Make an ideal tool for defining and discussing user
interaction
Easier to understand from users view point
Easier to create
NCC Education Limited, 2007
System Development Life Cycles - 3.19
V2.0
Drawbacks of Prototypes
Business managers may not understand the
purpose of a prototype
Some prototypes are so realistic that they give the
impression that the project is almost finished whilst
still at the systems analysis stage
The effort required to produce a prototype may lead
to the development team using it as a part of the
new system
NCC Education Limited, 2007
System Development Life Cycles - 3.20
V2.0
Velotec Product Data
Management System
Case Study:
High performance products division had
a major problem with parts produced for
motor racing team
Commissioned a system
V Model used by systems development
There were significant problems with the
finished system
NCC Education Limited, 2007
System Development Life Cycles - 3.21
V2.0
Systems Analysis
Requirements Analysis
Initial Strategy
Feasibility Study Review
Maintenance
Implementation
Testing
Development
Design
Specification
Iterative Development
NCC Education Limited, 2007
System Development Life Cycles - 3.22
V2.0
Rapid Development
Code
Integration
test
Unit test
Design
Prototype
Requirements
analysis & spec.
System &
acceptance test
NCC Education Limited, 2007
System Development Life Cycles - 3.23
V2.0
Implement
User
approval &
user
guidelines
Train users
Review
design
prototype
Design and Build
Iteration
Create
functional
prototype
Agree schedule
Identify functional
prototype
Agree
schedule
Feasibility
Business study
Review
business
Identify
design
prototypes
Review
prototype
Create
design
prototype
Implementation
Functional
Model
Iteration
.
2
1
3
1
2
3
2
DSDM
NCC Education Limited, 2007
System Development Life Cycles - 3.24
V2.0
Spiral Life Cycle
NCC Education Limited, 2007
System Development Life Cycles - 3.25
V2.0
Summary
Software life cycle development models have been examined
Two case studies used to illustrate the problems of the
Waterfall model
Introduced the ideas of prototyping and iterative
development
Introduced two alternative life cycles, DSDM and the Spiral
life cycle, used to demonstrate there are many alternatives
and in many organisations no standard is used, while in
others a standard is adopted, but does not always meet the
demands of the project
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.1
V 2 .0
International Diploma in
Computer Studies
Systems Development
Software Analysis and Design Methods
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.2
V 2 .0
Contents
Analysis and design methods
Modelling techniques
A history of methods at Velotec
Some traditional methods
Object technology
Program specification
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.3
V 2 .0
Introduction
Software engineering attempts to turn a craft
discipline into an engineering discipline
Need for a software development life cycle
SDLC provides a framework for development
The heart of the development process is the
analysis and design of applications
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.4
V 2 .0
Analysis and Design Methods
Analysis methods are those that we use during the
requirements analysis and requirements definition
stages
where we try to discover exactly what is required by the
user
Design methods are used during the system design
stage and are closely aligned with the coding
activity that follows
where we use structured methods and produce models
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.5
V 2 .0
Choosing the Correct Method
Guidelines:
Look for a method that is widely used
Look for a method that is adopted by governments
and other important organisations
Look for a method that is freely available, not
proprietary
Look for a method that reflects modern thinking
about life cycles and suits the organisation
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.6
V 2 .0
Bohm and Jacopini
*
Every possible system and every possible
program requires only the following three
types of construction:
Sequencing
Selection
Iteration
*Bohm C and Jacopini G "Flow Diagrams, Turing
Machines and Languages with Only Two Formation
Rules Communications of the ACM (1966)
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.7
V 2 .0
Data Modelling
Is used to show the things or entities
that are of importance in a system and
how these entities relate to each other
One advantage of a good model is that it
helps users understand the system
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.8
V 2 .0
Book
Borrower
Author
Data Model
Crows foot One relationship
Crows foot, many
relationships
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.9
V 2 .0
Data Flow Diagrams
Data Flow Diagrams show how data moves
within a system and where it is stored
One of the first types of models to be widely
used
Now a fundamental building block of many
analysis and design methodologies
Comment on how easy to understand you
find the following models
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.10
V 2 .0
Completed
application form
Person Apply for membership
Librarian
Member
Membership card
Reception desk 1
Change member
details
2
Delete member
details
3
Librarian
Detail changes
Member
Member left
M1 Member file
M1 Member file
Application form
Produce
membership card
DFD
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.11
V 2 .0
Supplier
Chief librarian
Member
Book processing
Delivery
New book
orders
Reserves
book
Returns
book
Borrows
book
Joins
library
List of old books
Context Diagram
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.12
V 2 .0
Decomposition of DFD
Further detail
Lowest level DFD
Expands into
is supported by
Context
diagram
Expands into
Mini-spec
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.13
V 2 .0
Library Book
Acquire
Available Remove
Buy Gift Loan
Issue Return
Sell Scrap
o o
*
o o
Entity Life History
Sequences are represented by boxes
read left to right on the same level
Alternatives are marked with a small
o
in the top right hand corner of the box
Repetitions are marked with a small
*
in the top right hand corner of a box
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.14
V 2 .0
A History of Methods at
Velotec
Most projects have not used any recognised
methodology, relying entirely on the person
developing the project
Velotec has used some techniques as
described in recognised methodologies, such
as Data Flow Diagrams
Previous IS managers thought methodologies
were a waste of time
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.15
V 2 .0
Structured Systems Analysis
Attempts at structure led to various
techniques, including:
Data flow diagrams
Data dictionary
Decision tables and decision trees
Structured English and pseudocode
Normalisation of data
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.16
V 2 .0
Jackson Structured
Programming (JSP)
Stage 1 model the problem by defining the input
and output data structures, using the tree-like
structure used in the ELH
Stage 2 transform the input/output models into a
structural model for the whole system by looking for
points of correspondence between items in the
input and output structures
Stage 3 expand the structural model into a
detailed design model that specifies all the
operations needed for the complete system
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.17
V 2 .0
SSADM
A variety of techniques are used including
entity life histories using a Jackson-like notation
data modelling based on an entity relationship approach
data flow modelling
data normalisation
One of the most highly developed conventional
analysis and design methodologies
A well-proven methodology that is freely available
and openly documented, used by many government
departments for all projects
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.18
V 2 .0
Object Technology
Became popular in the early 1990s
Has influenced much thinking about systems
analysis and design
Has resulted in:
- Object Oriented Programming (OOP)
- Object Oriented Analysis and Design (OOA
and OOD)
- Object Databases etc
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.19
V 2 .0
Attributes of an Object - 1
Encapsulation
an object packages together data and the access methods
to that data
the data within an object can only be changed by using
these methods
the object effectively hides the data from the outside world
Messages
the only way that an object can communicate is by means
of a message
a message can be passed between two objects and may
result in the object carrying out one of its methods
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.20
V 2 .0
Attributes of an Object - 2
Inheritance
an object belongs to a class of objects that share the same methods
a new class can be defined that inherits the data structure and
methods of its parent class
the new class can override some of the methods of the parent class
and add new methods
inheritance from a single class can be further elaborated to
inheritance from multiple classes
Polymorphism a word of Greek origin, meaning
many shapes
in object technology terms, classes that are different can implement
the same message
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.21
V 2 .0
Object Oriented Analysis and
Design
Based on objects
Does not mean a total break with the existing
structured analysis and design
methodologies
The Unified Modelling Language (UML) has
gained a lot of acceptance
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.22
V 2 .0
Pseudocode
DO WHILE there are more text records
DO WHILE there are more words in the text record
extract the next text word
search the word table for the extracted word
IF the extracted word is found
increment the words occurrence count
ELSE
insert the extracted word into the table
ENDIF
increment the words-processed count
ENDDO at the end of the next record
read the next text record
ENDDO when all text records have been read
Display the table
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.23
V 2 .0
Structure Diagram
Produce
invoice
Write title
Produce
invoice
body
Write
footer
Write item
description
Calculate
tax
Write
value
* Calculate
invoice
line
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.24
V 2 .0
Fine?
Process
fine
No
Yes
Start
Locate library
member
Process
book returned
Another
book?
End
No
Yes
A process is
shown as a box
A decision is
shown as a
diamond
The flow of
processing is
shown as arrows
linking the
symbols
Flowchart
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.25
V 2 .0
Decision Tables
A decision is represented
in a flowchart by the diamond symbol
in pseudocode by the IF ... ELSE statement
In a decision table, the question is asked first
followed by the answer
either Yes or No
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.26
V 2 .0
Decision Table - Four Basic
Elements
The condition stub
The condition entry
The action stub
The action entry
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.27
V 2 .0
Y Creditworthy?
Rules
Salaried?
Reject
Accept
2 1
-
-
-
N
3 4
Special person?
Y
Y N
N
N
Y Y Y
Y Y Y N N N N
N N N N
Y Y Y
- - - - -
5 6 7 8
Decision Table
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.28
V 2 .0
Creditworthy?
Salaried?
Reject
Accept
N
Special person?
N
-
N
ELSE
-
-
-
Simplified Decision Table
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.29
V 2 .0
Decision Tables - Useful
Features
Simple - easy for the user to understand
Complete and unambiguous - the analyst can
calculate the exact theoretical number of
rules to be specified
Statements of policy - they say nothing about
how the policy is carried out
Working documents - like all good analysis
tools, the decision table is a useful working
document
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.30
V 2 .0
Summary
Notations, methods and methodologies for
systems analysis and design
some notations such as simple flowcharts now
rarely used
other methods have matured and been put to use
in coherent methodologies
Everybody should be using an appropriate
methodology to suit their software
development projects
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.31
V 2 .0
Answer 4.1 - Exhaust Fitting
Context Diagram
Warehouse
Head Office
Customer
Operate workshop
Delivery
Order parts
Stock
response
Requests
work
Pays for work
Stock
query
Sales returns
HR Department
Training request
Certified fitters
NCC Education Limited, 2007
Software Analysis and Design Methods - 4.32
V 2 .0
Answer 4.2 - Exhaust
Component ELH
Exhaust Part
Receive Inspect Use
Accept Return
o o
Scrap Return
o o
Fit
o
NCC Education Limited, 2007
Documentation and Standards - 5.1
V2 .0
International Diploma in
Computer Studies
Systems Development
Documentation and Standards
NCC Education Limited, 2007
Documentation and Standards - 5.2
V2 .0
Contents
The need for standards
Standards and quality
Documentation and coding
standards
Types of documentation
NCC Education Limited, 2007
Documentation and Standards - 5.3
V2 .0
Introduction
The purpose of this chapter is to show that there is much to
be gained from good documentation and compliance with
appropriate standards
We have shown that by far the largest proportion of the life
cycle costs of a system can be absorbed in maintenance,
and that using appropriate standards and documentation is a
good way to minimise those costs
In this chapter we will take these ideas and apply them more
widely, so that we can see how standards and documentation
benefit us all the way through the development life cycle
NCC Education Limited, 2007
Documentation and Standards - 5.4
V2 .0
Standards
Used throughout the world
Some examples are:
the traffic light system
PC operating systems
food standards
Can you think of any standards
which apply to you?
NCC Education Limited, 2007
Documentation and Standards - 5.5
V2 .0
Why Standards?
The global development of IT depends on
standards - without standards:
we would not be able to physically connect
different types of equipment
programming languages would all be proprietary
systems would be built in an entirely different way
and would be immensely more expensive than they
currently are
The huge rise in the use of the PC is due to a
standard operating system
Standards give power to the consumer
NCC Education Limited, 2007
Documentation and Standards - 5.6
V2 .0
Standards and Quality
In order to improve quality we have first to
have a process that is well enough defined to
be repeatable and susceptible to monitoring
A standard provides the framework for this
repeatability
This is one of the reasons why written
procedures form part of Quality Management
Systems
NCC Education Limited, 2007
Documentation and Standards - 5.7
V2 .0
Good Documentation
Accessible
Readable
Understandable
Correct
Controlled
NCC Education Limited, 2007
Documentation and Standards - 5.8
V2 .0
Accessible
Documents need:
a clear structure
a table of contents
a detailed index
pointers to other relevant documents
to be catalogued
NCC Education Limited, 2007
Documentation and Standards - 5.9
V2 .0
Readable
No single style can be used for all documentation
Should be written to suit the profile of the
expected reader
User documentation should be written in a more
personal style and should not assume technical
expertise
Technical reports may favour a more passive
style
NCC Education Limited, 2007
Documentation and Standards - 5.10
V2 .0
Correct
Documentation should be subject to the full
verification and validation process
is this the right thing to document?
is this documentation correct?
Correctness requires testing by means of
peer review
NCC Education Limited, 2007
Documentation and Standards - 5.11
V2 .0
Controlled
All the products of the software development life
cycle are subject to change, and this includes
documentation
Version control systems possess some features
that help to keep control over project products
a check in/check out facility
a baseline and release control capability
the ability to create branches in the line of development
A system that does all this can be very complex,
but it is necessary to maintain control if
documentation is to remain useful
NCC Education Limited, 2007
Documentation and Standards - 5.12
V2 .0
Understandable
Documentation is intended to convey information
It can only do this if the reader is able to comprehend the
text
Comprehension is based partly on style, but also on the
assumptions made by the author about the expertise and
experience of the user
The writer should have a very clear idea about what can be
assumed of the reader
Advisable to ask someone to proof read the document
NCC Education Limited, 2007
Documentation and Standards - 5.13
V2 .0
Coding Standards - 1
Coding standards define rules that a
programmer must follow
Using coding standards helps to produce code
that will be efficient, effective, easy to maintain
and understandable by another programmer!
Internal standards usually define other aspects
of a programmer's work
NCC Education Limited, 2007
Documentation and Standards - 5.14
V2 .0
Coding Standards - 2
Function per page, single entry/exit point
Restrict scope of variables
Restrict use of some code statements
Standard for variable names uses date for calendar
date, not fruit date!! Never allow pet names or
family names
Use in-line comments to explain code
NCC Education Limited, 2007
Documentation and Standards - 5.15
V2 .0
Types of Documentation - 1
Type Use Stage
Project Initiation
Document
Define scope of project FS, BS
End of Stage Report Defines the status of development
at the end of a project stage
FS - I
Data Flow Diagram Define processes and flows of data FS, RA, RS,
LSS, LD
Entity Life History How an entity changes over time FS, RA, RS,
LSS, LD
Logical Data Model Relationships between entities FS, RA, RS,
LSS, LD
Flow Chart Show logic of system RA, PD
(if at all)
Structure Diagram Shows the processing done by a program LD
NCC Education Limited, 2007
Documentation and Standards - 5.16
V2 .0
Types of Documentation - 2
Decision Table Define complex logic LD
Program Listing Documents a program C
Test Report Summarises testing results T
Test Plan Describes how and what will be tested T
Test Case Describes a particular test T
Test Data Defines the data to be used with a test case T
Modification History Tracks changes to a system M
User Manual Describes how to use a system from users
perspective
I
System Manual Describes the operation of a system from a
technical viewpoint
M
Release Notes Describes what has changed since the last release
and any special installation requirements
I, M
Type Use Stage
NCC Education Limited, 2007
Documentation and Standards - 5.17
V2 .0
Summary
Ensure you fully understand the purposes of
notations, methods and methodologies for
systems analysis and design
ask yourself, who benefits from their use?
Every organisation should use an appropriate
methodology to suit their software
development projects
NCC Education Limited, 2007
Testing - 6.1
V2.0
International Diploma in
Computer Studies
Systems Development
Testing
NCC Education Limited, 2007
Testing - 6.2
V2.0
Contents
Defining testing
Types of testing
Designing and implementing tests
Planning and managing tests
Velotec testing
NCC Education Limited, 2007
Testing - 6.3
V2.0
Introduction
Testing is important
you would hope any train, car or plane you use has been thoroughly
tested; increasingly software is controlling such vehicles
Why and when should you test?
What should you expect to achieve as a result of
testing?
How do you plan, what do you test and for how
long?
We will consider some of the issues involved with
serious testing problems
NCC Education Limited, 2007
Testing - 6.4
V2.0
Defining Testing
The average persons definition:
testing makes products work and adds quality to them
Other definitions include:
testing is the process of demonstrating that errors are not
present
testing shows that a program performs its intended
functions correctly
testing is the process of establishing confidence that a
program does what it is supposed to do
These definitions are all flawed in quite a serious
way
NCC Education Limited, 2007
Testing - 6.5
V2.0
Testing or V and V
When you read text books on testing you will find that
verification and validation is the name given to the checking
and analysis processes that ensure the software conforms to
its specification and meets the needs (requirements) of the
customer. The difference between validation and
verification was expressed by Boehm (1979). Sommerville*
Validation are we building the right product?
Verification are we building the product right?
* Software Engineering, Ian Sommerville, Addison Wesley ISBN 0 201 39815
NCC Education Limited, 2007
Testing - 6.6
V2.0
Testing
Testing increases reliability, or suitability for
purpose
The process of testing is costly
Discovering and rectifying errors
Objective of testing is to find the most cost
effective tests available to uncover errors in a
system
NCC Education Limited, 2007
Testing - 6.7
V2.0
What is a Good Test?
A successful test is one that finds a
new error
A good test is one that has a high
probability of finding a new error
NCC Education Limited, 2007
Testing - 6.8
V2.0
Types of Error
Difficult to recognise
Not uncommon for suppliers of bespoke software
and customer to resort to litigation
In order to define an error you need to know what
the system is supposed to do (specification)
Important that specifications are produced which
enable the design of tests to explore (use all)
programme code
NCC Education Limited, 2007
Testing - 6.9
V2.0
The V Model
Tested modules
System design
Requirements
specification
Acceptance test
Maintenance
Tested
system
Integration and test
Code and unit test
Initial concept
Software design
Requirements definition
Detailed design
Tested software
Tested system
Tested software
Tested
modules
Module design
NCC Education Limited, 2007
Testing - 6.10
V2.0
Spiral Life Cycle
NCC Education Limited, 2007
Testing - 6.11
V2.0
We Cannot Test Everything
Would take too long
if for example, Microsoft fully tested each new Windows
release, would they ever get to the market?
Too expensive
Labour intensive - good tests cannot be
automated
Real situation
warship test of software controlled torpedo
NCC Education Limited, 2007
Testing - 6.12
V2.0
Probability of Further Errors
Errors already found
P
r
o
b
a
b
i
l
i
t
y
o
f
f
u
r
t
h
e
r
e
r
r
o
r
s
NCC Education Limited, 2007
Testing - 6.13
V2.0
Types of Testing
Black box testing
White box testing
Testing through the
life cycle
unit
package
integration
code inspection
system testing
acceptance testing
beta testing
usability testing
conformance testing
NCC Education Limited, 2007
Testing - 6.14
V2.0
Black Box Testing
(cannot see inside)
Data-driven
Input/output
Functional
No knowledge of system
internals
Tests use only standard
input interfaces
?
NCC Education Limited, 2007
Testing - 6.15
V2.0
White Box Testing
(can see inside)
Logic-driven
Structural
Glass box
Complete knowledge of
internals
Tests can use special
interfaces
NCC Education Limited, 2007
Testing - 6.16
V2.0
Types of System Testing
Used to discover
mismatches between the
system specification and the
system actually produced
There are a number of
different types of system
tests that can be used to
highlight specific types of
error
Functional testing
Volume testing
Stress testing
Usability testing
Security testing
Performance testing
Documentation testing
NCC Education Limited, 2007
Testing - 6.17
V2.0
Acceptance Testing
A form of black box testing
Critical difference is that it is normally carried
out by the customer or user of the system
Completion of acceptance testing is usually a
trigger for a major stage payment and sign off
Often carried out using a previously defined
test plan and test cases
NCC Education Limited, 2007
Testing - 6.18
V2.0
Beta Testing
Copies of system released to trusted users
under a non-disclosure agreement
Intended to supplement and follow on from
full internal system testing designed to
uncover errors in field use of the system
Should never be a replacement for thorough
system testing
NCC Education Limited, 2007
Testing - 6.19
V2.0
Usability Testing
Investigates how easy a new system is to use
Determines whether the system behaves in an
acceptable way for specific types of user/specific
tasks
Points to be considered are:
ease of learning
ease of use
flexibility
attitude
NCC Education Limited, 2007
Testing - 6.20
V2.0
Conformance Testing
Testing of hardware or software against a well
defined standard
Not usually undertaken by small and medium
sized organisations
Requires a great deal of careful planning and
in-depth knowledge of the relevant standards
NCC Education Limited, 2007
Testing - 6.21
V2.0
Regression Testing
When a system is in its maintenance phase, and even earlier
during its development, a large number of changes may be
made to the program code in order to correct errors
a significant risk that these changes may re-introduce previously
corrected errors
Regression testing is designed to detect this type of error re-
introduction
a series of tests that are run in succession and that are known to be
effective in finding the errors that have already been removed
usually automated
regression test tools are widely used by maintenance programmers
NCC Education Limited, 2007
Testing - 6.22
V2.0
Test Teams
Testing must be a destructive process if it is
to be successful
A successful test is one that discovers an
error
Need a team of people independent of the
development team, who have an incentive to
find errors
Costs are very high
NCC Education Limited, 2007
Testing - 6.23
V2.0
Designing and Implementing
Tests
How do we design tests?
Desk checking and dry running code
Simple testing occurs when a program is compiled
Count use of each line of code
Further errors can be detected at run-time by the
Operating System or the interpreter, if using an
interpreted language
Difficult to test for logic
There is no substitute for human based testing
NCC Education Limited, 2007
Testing - 6.24
V2.0
Integrated Development
Environments (IDE)
These software tools make the process of editing,
compiling, linking, running, recording and
debugging results more convenient
Used to handle all the files that make up a large
project
Typically offer some programmer oriented features
NCC Education Limited, 2007
Testing - 6.25
V2.0
Design Guidelines for Effective
Tests
Need to look actively for conditions that are
likely to cause a system to fail
For black box testing scenarios we must look
at systems in terms of input, output and data
storage
NCC Education Limited, 2007
Testing - 6.26
V2.0
Further Reading on Testing
For those of you who wish to understand more
about the whole process of testing, perhaps if you
intend to become a software engineer, we suggest
you read the chapter on
Software Testing in the text book:
Software Engineering, Ian Sommerville, Addison Wesley
ISBN 0 201 39815
NCC Education Limited, 2007
Testing - 6.27
V2.0
Design Guidelines - Inputs
Inputs:
- screen layout - ease of use, clarity, handling of incorrect entries
- forms design - legibility and ease of use
- data preparation and controls
- computer input validation
- submission of corrections
Test data for testing an input validation program should
include:
- minimum and maximum values of all data items
- minimum minus one, maximum plus one - which should be rejected
- item formats, dependencies, combinations, sequence - if relevant
- batch control total data - valid and invalid
NCC Education Limited, 2007
Testing - 6.28
V2.0
Design Guidelines Data Files
The content of test data for testing an update program should be
A copy of real data not the actual data; in some countries data on people
cannot be used for testing (UK DP ACT)
At least one of each type of transaction - in logical and illogical
combinations
Tests for no transactions, or no data in record
End of file combinations
The ability to insert before the first record on file, and after the last
The ability to delete records from the front and from the end of the file
Multiple transactions per record - if permitted
Duplicated insertions
At least one of every reportable error and exception
Production of every type of output
NCC Education Limited, 2007
Testing - 6.29
V2.0
Design Guidelines - Outputs
Output testing should include:
Presentation of data on user screens
Forms design
Completion and ease of preparation
Controls and transmission
Use of special devices
NCC Education Limited, 2007
Testing - 6.30
V2.0
Test Tools
Test tools can be used to:
automate regression testing
establish the coverage of testing
automate most of the documentation
carry out static testing of programmes
generate test data
create test load situations
NCC Education Limited, 2007
Testing - 6.31
V2.0
Planning and Managing Tests
Testing any significant sized system is a
large undertaking
A framework for testing and
documentation is needed and especially
for the documentation of testing
NCC Education Limited, 2007
Testing - 6.32
V2.0
Test Organisation
Test plan
planning
reporting
Test log
Test incident report
specification
Test design
Test case
Test procedure
NCC Education Limited, 2007
Testing - 6.33
V2.0
Test Plan - 1
The test plan defines
Scope
Methods
Resources required
Schedule of tests
Test
Plan
NCC Education Limited, 2007
Testing - 6.34
V2.0
Test Plan - 2
Test plan identifier
Introduction
Test items
Features to be tested
Features not to be
tested
Approach
Pass/fail criteria
Suspension criteria
Resumption conditions
Test deliverables
Environmental needs
Responsibilities
Approvals
The plan will include the following items:
NCC Education Limited, 2007
Testing - 6.35
V2.0
Test Design
Describes how a particular system feature will be
tested
Defines a series of test cases, which will be used
The typical contents of a test design are:
test design identifier - a unique identifier for this set of tests
features to be tested - the specific feature that this test design is
intended to test
test identification - lists the test cases which are needed, together with
a brief description
feature pass/fail criteria - a lower level pass/fail criterion, overriding
the global criterion
NCC Education Limited, 2007
Testing - 6.36
V2.0
Test Case
A test case consists
of the following:
test case identifier
test description
input specification
output specifications
Environmental needs - describes
any special requirements for
carrying out this test, in addition
to those given in the test plan
Inter-case dependencies - all
dependent tests which can only
be performed when this test has
been performed, possibly without
error; all the tests which must be
performed prior to this one
NCC Education Limited, 2007
Testing - 6.37
V2.0
Test Procedure
Describes how the test
should be carried out
Consists of the following:
test procedure identifier
purpose : lists all the test
cases which are associated
with the procedure
procedure steps : describes
what the tester should do -
very important when the
testers are distinct from the
development team
The procedure steps should
include:
log
start up
procedure
measurement
shut down
restart
wrap up
contingencies
NCC Education Limited, 2007
Testing - 6.38
V2.0
Test Log
The test log is typically
one line per test case
and consists of the
following items:
test log identifier
description
Individual test logs
contain:
date
time
tester
result
error flag
incident report identifier
NCC Education Limited, 2007
Testing - 6.39
V2.0
Test Documentation
Test Plan
Test Case Test Procedure
Test Log Incident Report
Test Design
NCC Education Limited, 2007
Testing - 6.40
V2.0
Velotec Testing
Velotec, in common with many other medium
sized organisations, used to rely on a
combination of :
ad hoc white box testing carried out by
programmers
some black box system testing led by the project
manager and other members of the team
some very limited acceptance testing by the
business managers
NCC Education Limited, 2007
Testing - 6.41
V2.0
Summary
Important set of definitions that give a slightly counter-intuitive view of
the reasons for testing
Two distinct classes of testing
those that assume internal knowledge of a system (white box)
those that do not (black box)
Testing is needed at all stages in the software development life cycle
Guidelines for test design
Documentation of testing is critically important
We have seen what serious consequences poor testing can have and the
human and organisational impact that can arise from a testing disaster