Lecture 2 Software Development and Testing
Lecture 2 Software Development and Testing
85% % Defects
Introduced in
this phase
% Defects
42% found in
in this phase
$1000
$ Cost to
$130 $250 repair defect
$25
in this phase
V-Model
Requirements Specification
For large software systems, the Requirements Specification is usually
broken into up to 4 separate steps.
1. Feasibility study: exploration of the proposed system and the cost-
effectiveness of undertaking its development.
2. Requirements analysis: an analysis of the current business processes
and models of these for user and developer understanding.
3. Requirements definition: statement of exactly the nature of what
the proposed system must do
4. Requirements specification details: detailed description of the
proposed system to become the contract between customer and
the developer
Software Requirements Specification (SRS)
The system requirements are expressed in a Software Requirements
Specification document (SRS). The SRS is usually structured with
chapters to include:
1. Introduction
2. Glossary: listing of technical terms with definitions
3. System models: illustration of the relationship between the system
components and the system and the environment. These can be
object models, data-flow models and semantic data models
4. Non-functional requirements: listing of the constraints and the
restrictions imposed on the software which may include specific
data representation, response time and memory requirements. They
also include product and process standards that must be followed.
Software Requirements Specification (SRS)
5. Functional requirements: listing of services required by the user that
the software system will do.
6. Requirements specification: more detailed listing of the functional
requirements and will include descriptions of various routines
and sub-routines.
7. Other chapters may include descriptions of system evolution,
hardware and database requirements.
And sometimes:
8. Software reliability specification: identification of the types of failure
that may occur and a measure (e.g. 1 incident per 100 days) will be
tolerated.
Software Reliability
• In testing it is not possible to know if you have discovered all possible
inputs into a program or system that will result in faults or failures
(Sommerville, 1996).
• Reliability is about finding as many inputs as possible, however the
very high costs of reliability achievement often means that it may be
more cost effective to accept unreliability and pay for failure costs.
Software Reliability Specification
Many SRS documents have loose subjective statements concerning
software reliability specification, such as,
• “the software shall be as reliable as possible”.
• “the software will exhibit no more than N faults per 1000 lines of
code”.
In both cases, the meaning is not clear. For large systems, different
types of failure need to be identified and then quantified, that is have a
measure of acceptance.
Software Reliability Specification
• It is important for software systems to be reliable, particularly when
the costs of system failure can exceed the cost of developing the
system.
• Software reliability needs to be quantified, that is measured, as it is
possible for a system to contain faults whilst the software is still
considered by users to be reliable.
• The type of metric chosen depends on the type of system or sub-
system under examination.
• It is possible to statistically test systems to gauge metric values. Also,
there are models of reliability that can be used to estimate when
enough testing has been done.
Statistical Testing
Statistical testing is used for reliability assessment on the assumption that
test data set reflects the use of the software.
1. Determine operational profile of the software.
• May be straightforward for ‘normal’ inputs but it is difficult to predict ‘unlikely’
inputs and to create test data for them.
2. Generate a set of test data corresponding to this profile.
• Where possible automatically generate test data.
3. Apply tests, measuring amount of execution time between each failure.
4. After a statistically valid number of tests have been executed, reliability
can be measured.
Reliability models may be used to predict when a required level of
reliability will be achieved.
Software reliability measures
Software reliability measures
Waterfall Model: Advantages & Disadvantages
Advantages
• Works from definitions of requirements (broad descriptions) to more
detailed activities.
• Easily imported into project management tools.
Disadvantages
• Sequential nature precludes revisiting an earlier activity that is
considered finished. Each step finishes with a milestone so it is
probable that a defect generated in a particular stage could go
undetected until after the milestone has been reached.
• Testing is done quite late in project development.
• Cannot accommodate customer changes to requirements.
Boehm’s spiral model of software development
Boehm’s spiral model of software development
Each loop in the spiral is split into 4 sectors:
1. Objective setting for the loop where planning takes place,
constraints and risks are identified.
2. Risk assessment undertaken to reduce impact of risk, e.g. if
requirements are inappropriate develop a prototype to explore.
3. Development and validation by exploring prototype behaviour.
4. Review work done and plan future activities, continue to step 1.
Note: with each successive spiral the level of detail of the project
increases and becomes more complex
Boehm’s spiral model of software development
Key feature of this model is the use of prototypes, continuous
testing and risk evaluation.
• Throwaway prototyping refers to the creation of a model that will
eventually be discarded rather than becoming part of the final
delivered software.
• Evolutionary prototyping refers to the attempt to build a very
robust prototype in a structured manner and constantly refine it.
• Incremental prototyping is where the final product is built as
separate prototypes. At the end, the separate prototypes are
merged in an overall design.
• Extreme prototyping is a development process is used especially
for developing web applications.
Prototyping
REQUIREMENTS
• A good approach for small to DETERMINATION
BY CUSTOMER
medium-sized projects. PROTOTYPE
• Very important: customer involvement. DESIGM
PROTOTYPE
IMPLEMENTATION
PROTOTYPE
EVALUATION
BY CUSTOMER
NO REQUIREMENTS FOR
REQUIREMENTS CORRECTIONS, CHANGES
FULFILLED ? AND ADDITIONS
YES
SYSTEM TESTS AND
ACCEPTANCE TESTS
SYSTEM CONVERSION
SYSTEM OPERATION
AND MAINTENANCE
Prototyping: Advantages