Chapter 4 – Requirements Engineering
Some of the slides are taken from: Prof. Gregor V. Bochmann’s Software Requirements
Analysis Course https://www.site.uottawa.ca/~bochmann/SEG3101/
4/1/2019 1
Topics covered
Introduction to requirements analysis
Functional and non-functional requirements
Requirements engineering processes
IEEE 830 – 1998 SRS
4/1/2019 2
Requirements engineering
The process of establishing the services that a customer
requires from a system and the constraints under which
it operates and is developed.
The system requirements are the descriptions of the
system services and constraints that are generated
during the requirements engineering process.
4/1/2019 3
What is a requirement?
It may range from a high-level abstract statement of a
service or of a system constraint to a detailed
mathematical functional specification.
Requirements may serve a dual function
May be the basis for a bid for a contract.
May be the basis for the contract itself.
4/1/2019 4
Types of requirement
User requirements
Statements in natural language plus diagrams of the services the
system provides and its operational constraints.
Written for customers.
System requirements
A structured document setting out detailed descriptions of the
system’s functions, services and operational constraints.
Defines what should be implemented so may be part of a
contract between client and contractor.
4/1/2019 5
Mentcare
Mentcare is a medical information system that maintains
information about patients suffering from mental health
problems and the treatments that they have received.
It makes use of a centralized database of patient
information but has also been designed to run on a PC.
It may be accessed and used from sites that do not have
secure network connectivity.
When the local systems have secure network access,
they use patient information in the database but they can
download and use local copies of patient records when
they are disconnected.
6
4/1/2019
Mentcare goals
To generate management information that allows health
service managers to assess performance against local
and government targets.
To provide medical staff with timely information to
support the treatment of patients.
7
4/1/2019
The organization of the Mentcare system
4/1/2019 8
User and system requirements
4/1/2019 9
Readers of different types of requirements
specification
4/1/2019 10
User requirements vs. System requirements
4/1/2019 11
System stakeholders
Any person or organization who is affected by the
system in some way and so who has a legitimate interest
Stakeholder types
End users
System managers
System owners
External stakeholders
4/1/2019 12
Stakeholders in the Mentcare system
Patients whose information is recorded in the system.
Doctors who are responsible for assessing and treating
patients.
Nurses who coordinate the consultations with doctors
and administer some treatments.
Medical receptionists who manage patients’
appointments.
IT staff who are responsible for installing and maintaining
the system.
4/1/2019 13
Stakeholders in the Mentcare system
A medical ethics manager
Ensure that the system meets current ethical guidelines for
patient care.
Health care managers
Obtain management information from the system.
Medical records staff
Responsible for ensuring that system information can be
maintained and preserved, and that record keeping procedures
have been properly implemented.
4/1/2019 14
Functional and non-functional requirements
4/1/2019 15
Functional and non-functional requirements
Functional requirements
Statements of services the system should provide, how the system should
react to particular inputs and how the system should behave in particular
situations.
May state what the system should not do.
Non-functional requirements
Constraints on the services or functions offered by the system such as
timing constraints, constraints on the development process, standards, etc.
Often apply to the system as a whole rather than individual features or
services.
Domain requirements
Domain reflects the environment in which the system operates so.
Constraints on the system from the domain of operation.
4/1/2019 16
Functional requirements
Describe functionality or system services.
Depend on the type of software, expected users and the
type of system where the software is used.
Functional user requirements may be high-level
statements of what the system should do.
Functional system requirements should describe the
system services in detail.
4/1/2019 17
Mentcare system: examples of functional
requirements
A user shall be able to search the appointments lists for
all clinics.
The system shall generate each day, for each clinic, a
list of patients who are expected to attend appointments
that day.
Each staff member using the system shall be uniquely
identified by his or her 8-digit employee number.
4/1/2019 18
Non-functional requirements
These define system properties and constraints e.g.
reliability, response time and storage requirements.
Constraints are I/O device capability, system
representations, etc.
Process requirements may also be specified mandating
a particular IDE, programming language or development
method.
Non-functional requirements may be more critical than
functional requirements. If these are not met, the system
may be useless.
4/1/2019 19
Types of nonfunctional requirement
4/1/2019 20
Non-functional classifications
Product requirements
Requirements which specify that the delivered product must
behave in a particular way e.g. execution speed, reliability, etc.
Organisational requirements
Requirements which are a consequence of organisational
policies and procedures e.g. process standards used,
implementation requirements, etc.
External requirements
Requirements which arise from factors which are external to the
system and its development process e.g. interoperability
requirements, legislative requirements, etc.
4/1/2019 21
Examples of nonfunctional requirements in the
Mentcare system
Product requirement
The Mentcare system shall be available to all clinics during normal
working hours (Mon–Fri, 0830–17.30). Downtime within normal
working hours shall not exceed five seconds in any one day.
Organizational requirement
Users of the Mentcare system shall authenticate themselves using
their health authority identity card.
External requirement
The system shall implement patient privacy provisions as set out in
HStan-03-2006-priv.
4/1/2019 22
Usability requirements
The system should be easy to use by medical staff and
should be organized in such a way that user errors are
minimized. (Goal)
Medical staff shall be able to use all the system functions
after four hours of training. After this training, the
average number of errors made by experienced users
shall not exceed two per hour of system use. (Testable
non-functional requirement)
4/1/2019 23
Metrics for specifying nonfunctional
requirements
Property Measure
Speed Processed transactions/second
User/event response time
Screen refresh time
Size Mbytes
Number of ROM chips
Ease of use Training time
Number of help frames
Reliability Mean time to failure
Probability of unavailability
Rate of failure occurrence
Availability
Robustness Time to restart after failure
Percentage of events causing failure
Probability of data corruption on failure
Portability Percentage of target dependent statements
Number of target systems
4/1/2019 24
Requirements engineering processes
4/1/2019 25
Requirements engineering processes
The processes used for RE vary widely depending on
the application domain, the people involved and the
organisation developing the requirements.
However, there are a number of generic activities
common to all processes
Requirements elicitation;
Requirements analysis;
Requirements validation;
Requirements management.
In practice, RE is an iterative activity in which these
processes are interleaved.
4/1/2019 26
A spiral view of the requirements engineering
process
4/1/2019 27
Requirements elicitation
4/1/2019 28
Requirements elicitation and analysis
Sometimes called requirements elicitation or
requirements discovery.
Involves technical staff working with customers to find
out about the application domain, the services that the
system should provide and the system’s operational
constraints.
May involve end-users, managers, engineers involved in
maintenance, domain experts, trade unions, etc. These
are called stakeholders.
4/1/2019 29
Requirements discovery
The process of gathering information about the required
and existing systems and distilling the user and system
requirements from this information.
Interaction is with system stakeholders from managers to
external regulators.
Systems normally have a range of stakeholders.
4/1/2019 30
Interviewing
Formal or informal interviews with stakeholders are part
of most RE processes.
Types of interview
Closed interviews based on pre-determined list of questions
Open interviews where various issues are explored with
stakeholders.
Effective interviewing
Be open-minded, avoid pre-conceived ideas about the
requirements and are willing to listen to stakeholders.
Prompt the interviewee to get discussions going using a
springboard question, a requirements proposal, or by working
together on a prototype system.
4/1/2019 31
Interviews in practice
Normally a mix of closed and open-ended interviewing.
Interviews are good for getting an overall understanding
of what stakeholders do and how they might interact with
the system.
Interviewers need to be open-minded without pre-
conceived ideas of what the system should do
You need to prompt the user to talk about the system by
suggesting requirements rather than simply asking them
what they want.
4/1/2019 32
Problems with interviews
Application specialists may use language to describe
their work that isn’t easy for the requirements engineer to
understand.
Interviews are not good for understanding domain
requirements
Requirements engineers cannot understand specific domain
terminology;
Some domain knowledge is so familiar that people find it hard to
articulate or think that it isn’t worth articulating.
4/1/2019 33
Stories and scenarios
Scenarios and user stories are real-life examples of how
a system can be used.
Stories and scenarios are a description of how a system
may be used for a particular task.
Because they are based on a practical situation,
stakeholders can relate to them and can comment on
their situation with respect to the story.
4/1/2019 34
Scenarios
A structured form of user story
Scenarios should include
A description of the starting situation;
A description of the normal flow of events;
A description of what can go wrong;
Information about other concurrent activities;
A description of the state when the scenario finishes.
4/1/2019 35
Example Scenario
Scenario: ATM banking for the week.
Sally Jones places her bank card into the ATM.
Sally successfully logs into the ATM using her personal
identification number.
Sally deposits her weekly paycheck of $350 into her savings
account.
Sally pays her phone bill of $75, her electric bill of $145, her
cable bill of $55, and her water bill of $85 from her savings
account.
Sally attempts to withdraw $100 from her savings account for the
weekend but discovers that she has insufficient funds.
Sally withdraws $40 and gets her card back.
4/1/2019 36
Requirements specification
4/1/2019 37
Requirements specification
The process of writing down the user and system
requirements in a requirements document.
User requirements have to be understandable by end-
users and customers who do not have a technical
background.
System requirements are more detailed requirements
and may include more technical information.
The requirements may be part of a contract for the
system development
It is therefore important that these are as complete as possible.
4/1/2019 38
Ways of writing a system requirements
specification
Notation Description
Natural language The requirements are written using numbered sentences in natural language.
Each sentence should express one requirement.
Structured natural The requirements are written in natural language on a standard form or
language template. Each field provides information about an aspect of the
requirement. (e.g. use case specification)
Graphical notations Graphical models, supplemented by text annotations, are used to define the
functional requirements for the system; UML use case and sequence
diagrams are commonly used.
Mathematical These notations are based on mathematical concepts such as finite-state
specifications machines or sets. Although these unambiguous specifications can reduce
the ambiguity in a requirements document, most customers don’t understand
a formal specification. They cannot check that it represents what they want
and are reluctant to accept it as a system contract.
4/1/2019 39
A structured specification of a requirement for
an insulin pump
4/1/2019 40
A structured specification of a requirement for
an insulin pump
4/1/2019 41
Use cases
Use-cases are a kind of scenario that are included in the
UML.
Use cases identify the actors in an interaction and which
describe the interaction itself.
A set of use cases should describe all possible
interactions with the system.
High-level graphical model supplemented by more
detailed tabular description.
UML sequence diagrams may be used to add detail to
use-cases by showing the sequence of event processing
in the system.
4/1/2019 42
Use cases for the Mentcare system
4/1/2019 43
The software requirements document
The software requirements document is the official
statement of what is required of the system developers.
Should include both a definition of user requirements
and a specification of the system requirements.
It is NOT a design document. As far as possible, it
should set of WHAT the system should do rather than
HOW it should do it.
4/1/2019 44
Users of a requirements document
4/1/2019 45
Requirements validation
4/1/2019 46
Requirements validation
Concerned with demonstrating that the requirements
define the system that the customer really wants.
Requirements error costs are high so validation is very
important
Fixing a requirements error after delivery may cost up to 100
times the cost of fixing an implementation error.
4/1/2019 47
Requirements validation techniques
Requirements reviews
Systematic manual analysis of the requirements.
Prototyping
Using an executable model of the system to check requirements.
Test-case generation
Developing tests for requirements to check testability.
4/1/2019 48
Requirements change
4/1/2019 49
Requirements evolution
4/1/2019 50
Requirements change management
Deciding if a requirements change should be accepted
Problem analysis and change specification
• During this stage, the problem or the change proposal is analyzed
to check that it is valid. This analysis is fed back to the change
requestor who may respond with a more specific requirements
change proposal, or decide to withdraw the request.
Change analysis and costing
• The effect of the proposed change is assessed using traceability
information and general knowledge of the system requirements.
Once this analysis is completed, a decision is made whether or not
to proceed with the requirements change.
Change implementation
• The requirements document and, where necessary, the system
design and implementation, are modified. Ideally, the document
should be organized so that changes can be easily implemented.
4/1/2019 51
Requirements change management
4/1/2019 52
4/1/2019 53
4/1/2019 54
4/1/2019 55
4/1/2019 56
Milestone 1
4/1/2019 57