Eliciting Requirements Specifying Requirements
Eliciting Requirements Specifying Requirements
Eliciting Requirements Specifying Requirements
Specifying Requirements
Nicolas Sannier
* EDF R&D STEP, 6 Quai Watier BP49
78401 Chatou, France
nicolas.sannier@edf.fr
** Inria, Campus Universitaire de Beaulieu,
35042, Rennes Cedex, France
nicolas.sannier@inria.fr
Where does this lecture come from?
2
Summary from Last Session
3
What is the program for today?
Requirements Elicitation
You said Requirements Elicitation ?
Goals and Challenges
Risks
Sources
Stakeholders
Elicitation tasks and techniques
Requirements Specifications - Writing Better Requirements
Cant write a better requirement because
Natural Language Requirements
Standards, Tips and Pitfalls toward better Requirements Writing
Writing Requirements using EARS Templates
Requirements Specifications - Writing Requirements Documents
IEEE 830 Standard for Software Requirements Specifications
Some Training Exercises
4
Introduction
Elicitating things
I know that you believe that you understood what you think I said,
but I am not sure you realize that what you heard is not what I meant.
Robert McCloskey, State Department spokesman (attributed)
5
REQUIREMENTS ELICITATION
6
You said Requirements Elicitation?
It's really hard to design products by focus groups. A lot of times, people don't know
what they want until you show it to them
Steve Jobs - 1998
7
Requirements Elicitation
Goals and Challenges
8
Requirements Elicitation
Risks
Typical issues
Experts seldom available
Finding an adequate level of precision/detail
Common vocabulary often missing
9
Sources of Requirements
Various stakeholders
Clients, customers, users (past and future), buyers, managers, domain experts,
developers, marketing and QA people, lawyers, people involved in related
systems, anyone who can bring added value!
Often restricted number of persons (and not the best ones)
Pre-existing systems
Not necessarily software systems
Pre-existing documentation
Competing systems
Documentation about interfacing systems
Standards, policies, collective agreements, legislation
10
About stakeholders
11
About stakeholders
12
About stakeholders
Domain Expert
Expert who knows the work involved
Familiar with the problem that the software must solve. For example:
Financial expert for finance management software
Aeronautical engineers for air navigation systems
Meteorologist for weather forecasting system, etc
Also knows the environment in which the product will be used
Inspector
An expert in governmental rules and safety relevant to the project
Examples: safety inspectors, auditors, technical inspectors
Lawyer
Familiar with laws, legal aspects, and/or standards relevant to the project
Expert of systems that interact with the system to be built
Knows the interfaces of the interacting systems
May be interested in product features
13
About stakeholders
14
Requirements Elicitation Tasks
15
Requirements Elicitation tasks
Elicitation is incremental
Repeat as much as necessary
Driven by information obtained
You always do a bit of elicitation analysis specification verification at the
same time (even in a V-Cycle)
16
Requirements Elicitation
Being Innovative & Attractive
Excitement: Unexpected/unknown
feature, which produces the whow
effect .
Performance : expected
feature, explicit requirement
Basic features: implicit or
assumed features.
No impact if present,
unsatisfaction if missing
17
Requirements Elicitation Techniques
Elicitation plans
Usually set of rough requirements
Written, audio, video notes
Documentation
Deliverables depend on objective and technique
Generally: un-organized, redundant, incomplete
19
Requirements Elicitation
Comparison of Some Elicitation Techniques
Questionnaires Answering specific Quantitative Can reach many The design is crucial.
questions and qualitative people with low Response rate may be
data resource low. Responses may not
be what you want
Interviews Exploring issues Some Interviewer can guide Time consuming.
quantitative but interviewee. Artificiaenvironment may
mostly Encourages contact intimidate interviewee
qualitative data between developers
and users
Focus groups and Collecting multiple Some Highlights areas of Possibility of dominant
workshops viewpoints quantitative but consensus and characters
mostly conflict. Encourages
qualitative data contact between
developers and users
Naturalistic Understanding Qualitative Observing actuawork Very time consuming.
observation context of user gives insight that Huge amounts of data
activity other techniques
cannot give
Studying Learning about Quantitative No time commitment Day-to-day work wildiffer
documentation procedures, from users required from documented
regulations, and procedures
standards
Source: Preece, Rogers, and Sharp Interaction Design: Beyond human-computer interaction, p214 20
Requirements Elicitation
Analysis of Existing System
21
Requirements Elicitation
Observation and Ethnography
Observation
Get into the trenches and observe specialists in the wild
Shadow important potential users as they do their work
Initially observe silently (otherwise you may get biased information)
Ask user to explain everything he or she is doing
Session videotaping
Ethnography also attempts to discover social, human, and political factors, which may
also impact requirements
Can be supplemented later with questionnaires
To answer questions that need comparison or corroboration (confirmation)
To obtain some statistics from a large number of users (statistical significance)
Can be supplemented later with interviews
Some questions may require more detailed answers
You will not be wasting other people's time or your own
This is very labour intensive!
22
Observations & Etnography
23
Ethnography
24
Observations & Etnography
Example Bridge of the French Navy Ship Mistral
25
Observations & Etnography
Example Bridge of the French Navy Ship Forbin
26
Interviews
27
Interviews
28
Interviews
Elicitation Notes
29
Interviews
Common mistakes
30
Interviews
Starting questions - Context-free questions to narrow the scope a bit
31
Interviews
Starting questions - Context-free questions to narrow the scope a bit
32
Interviews
Specific questions
Functional requirements
What will the system do? When wilt he system do it?
Are there several modes of operations?
What kinds of computations or data transformations must be performed?
What are the appropriate reactions to possible stimuli?
For both input and output, what should be the format of the data?
Must any data be retained for any period of time?
Design Constraints
Physical environment
Where is the equipment to be located? Is there one location or several?
Are there any environmental restrictions, such as temperature, humidity, or
magnetic interference?
Are there any constraints on the size of the system?
Are there any constraints on power, heating, or air conditioning?
Are there constraints on the programming language because of existing
software components?
33
Interviews
Specific questions
Design Constraints
Interfaces
Is input coming from one or more other systems?
Is output going to one or more other systems?
Is there a prescribed way in which input/output need to be formatted?
Is there a prescribed way for storing data?
Is there a prescribed medium that the data must use?
Standards
Are there any standards relevant to the system?
Laws, policies, and regulations
Are there any laws, policies, or regulations applicable here?
Performance
Are there constraints on execution speed, response time, or throughput?
What efficiency measure will apply to resource usage and response time?
How much data will flow through the system?
34
Interviews
Specific questions
35
Interviews
Specific questions
36
Interviews
Ignorance is Bliss
Mr Reagan Cypher The Matrix (1999)
Ignorance is Bliss
At least for a short time
Ignorance (not stupidity!) allows one to expose hypotheses and some implicit
facts
37
Brainstorming
38
Brainstorming
Objectives
39
Brainstorming
Roles and Participants
Scribe
Write down all ideas (may also contribute)
May ask clarifying questions during first phase but without criticizing
Moderator/Leader
Cannot be the scribe
Two schools of thought: traffic cop or agent provocateur
Traffic cop enforces "rules of order", but does not throw his/her weight around
otherwise
Agent provocateur traffic cop plus more of a leadership role, comes prepared
with wild ideas and throws them out as discussion wanes
May also explicitly look for variations and combinations of other suggestions
Virtually any stakeholder, e.g.
Developers, Domain experts, End-users, Clients, ...
Ideas-people a company may have a special team of people
Chair or participate in brainstorming sessions
Not necessarily further involved with the project
40
Brainstorming
Storm and Calm
The Storm
Goal is to generate as many ideas as possible
Look to combine or vary ideas already suggested
No criticism or debate is permitted
Wild is good!
Participants should NOT censor themselves let yourself go!
The Calm
Go over the list of ideas and explain them clearly
Review, consolidate, combine, clarify
Categorize into yes maybe and no
Rank the list by priority somehow
Informal consensus, 50% + 1 vote, veto?
Be careful about time and people
Long meetings tend to lose focus
after 90 to 120 minutes
Be careful not to offend participants
41
Brainstorming
Eliminating ideas
Blending ideas
Unify similar ideas but be aware not to force fit everything into one idea
Give each participant fake money to spend on the ideas
Apply acceptance criteria prepared prior to meeting
Eliminate the ideas that do not meet the criteria
Various ranking or scoring methods
Assign points for criteria met, possibly use a weighted formula
Vote with threshold or campaign speeches
Possibly select top k for voting treatment
42
Prototyping
43
Use cases
use case
<<extend>>
Reserve Facility Register Member
Handle Waiting List
generalization
<<include>>
<<include>>
Hotel Counter Staff
Customer Reserve Room
Check In Customer
Check Room
Details <<include>>
actor extension
<<extend>> point
Member Earn and Redeem Credits
Check Out Customer
45
Use Case Diagrams
46
Scenarios
47
Types of Scenarios
As-is scenario
Used in describing a current situation, usually used in re-engineering projects,
the user describes the system
Visionary scenario
Used to describe a future system, usually used in greenfield engineering and
reengineering projects
Can often not be done by the user or developer alone
Evaluation scenario
User tasks against which the system is to be evaluated
Training scenario
Step by step instructions that guide a novice user through a system
48
Scenarios Representations
49
Scenarios with URN & Use Case Maps
50
REQUIREMENTS SPECIFICATION
WRITING BETTER REQUIREMENTS
51
Introduction
52
Alice and Bob cannot write Requirements
because
53
Natural Language Requirements
54
Natural Language ambiguity
Lexical ambiguity
The fisherman went to the bank
Bank is a as well a financial institution and the ground along the edge of a river
Syntactical ambiguity
Alice saw a man with a telescope.
Alice, using a telescope, saw a man.
Alice saw a man holding a telescope in his hands.
Semantic ambiguity
"There was not a single man at the party."
No men at all at the party
No men who were single at the party
Referential ambiguity
55
Why is it ambiguous?
56
Anatomies of Good and Bad Requirements
Defines the system under discussion Verb with correct identifier (shall or may)
58
Standards for Writing
60
Writing Pitfalls to Avoid
62
Writing Pitfalls to Avoid
63
Writing Requirements Using EARS Templates
A. Mavin et al., Easy Approach to Requirements Syntax, RE2009
64
Writing with EARS
Generic syntax is
<optional preconditions> <optional trigger> the <system name> shall
<system response>
Simple structure adds rigor & clarity
System response describes what the system must actually do that is visible at
the boundary of the system
(can use combinations of When, While and Where for requirements with complex
conditional clauses)
65
EARS Normal Operation Templates
Ubiquitous Requirement
The <system name> shall<system response>
Used to define system behavior that must be active at all times continuous
No preconditions or trigger unconditional
Event-driven Requirement
When <trigger> the <system name> shall <system response>
Initiated only when a triggering event is detected at the system boundary
The trigger must be something that the system itself can detect
State-driven Requirement
While <in a specific state> the <system name> shall <system response>
Requirement is active while the system is in a defined state
Requirement is continuous, but only while the system is in the specified state
Option
Where <feature is included> the <system name> shall <system response>
Applicable only in systems that include a particular feature
The requirement will often be ubiquitous, but only for systems that include the
specified feature
66
EARS Unwanted Behavior Template
67
Examples of EARS Requirements
When the laptop is running and the laptop is closed, the laptop shall enter
"powersave" mode
While the laptop is running on the battery and the battery is below XXX % charge, the
laptop shall display "low battery
Where the laptop is a "lightweight model, the laptop shall have a mass of no more
than XXX grams
If the incorrect password is entered, then the laptop shall display XXX warning
message
68
Complex Requirements Syntax
While the laptop is running on mains electrical power, if the power cable is disconnected,
then the laptop shall display a warning message.
69
EARS Strengths and weaknesses
Strengths
Provides rigor and consistency
Easy to learn and apply
No tools needed
Common form of requirements
communication
Weaknesses
Limited inter-requirement coupling
Unsuitable for very complex requirements
(consider using truth tables or other non-textual notation)
70
Specifying Requirements using Dwyers Patterns
M. B. Dwyer et al., Patterns in Property Specifications for Finite-State Verification, ICSE99
71
Volere Requirement Shells
Suzanne and James Robertson, Mastering the Requirements Process , Addison-Wesley, London, 1999.
72
Toward Good Requirements Specifications
73
Toward Good Requirements Specification
Necessary
Doesnt contain anything that isnt required
Unambiguous
Every statement can be read in exactly one way
Clearly defines confusing terms
(e.g., in a glossary)
Uniquely identifiable
For traceability and version control
Verifiable
A process exists to test satisfaction of each requirement
every requirement is specified behaviorally
Understandable (clear)
E.g., by non-computer specialists
Modifiable
Must be kept up to date!
74
Typical Mistakes
Noise = the presence of text that carries no relevant information to any feature
Silence = a feature that is not covered by any text
Over-specification = describing a feature of the solution, rather than the problem
Contradiction = text that defines a single feature in a number of incompatible ways
Ambiguity = text that can be interpreted in 2 or more different ways
Forward reference = text that refers to a feature yet to be defined
Wishful thinking = text that defines a feature that cannot possibly be validated
Jigsaw puzzles = distributing requirements across a spec and then cross-referencing
Inconsistent terminology = inventing and then changing terminology
Delegating = i.e. making the reader work hard to decipher the intent
Writing for the hostile reader (fewer of these exist than friendly ones)
75
Some Training
Rate these requirements
77
You said Requirements Document?
78
Templates for Requirements Specification Documents?
79
IEEE830 Objectives and Benefits
Establish the basis for agreement between the customers and the suppliers on what
the software product is to do
Reduce the development effort
Forced to consider requirements early reduces later redesign, recoding,
retesting
Provide a basis for realistic estimates of costs and schedules
Provide a basis for validation and verification
Facilitate transfer of the software product to new users or new machines
Serve as a basis for enhancement requests
80
How to produce a good SRS?
81
How to structure a SRS?
82
SRS Section 1
83
SRS Section 2
Present the business case and operational concept of the system
Describe how the proposed system fits into the business context
Describe external interfaces: system, user, hardware, software, communication
Title Describe constraints: memory, operational, site adaptation
Table of Contents
Summarize the major functional capabilities
1. Introduction Include the Use Case Diagram and supporting narrative
2. Overall Description (identify actors and use cases)
Include Data Flow Diagram if appropriate
2.1 Product Perspective
2.2 Product Functions Describe and justify technical skills
2.3 User Characteristics and capabilities of each user class
2.4 Constraints
2.5 Assumptions and Dependencies
3. Specific Requirements
4. Appendices Describe other constraints that will limit developers
5. Index options; e.g., regulatory policies; target platform,
database, network software and protocols, development
standards requirements
84
SRS Section 3
1. Introduction
Specify software requirements in sufficient
2. Overall Description detail to enable designers to design a system to satisfy
those requirements and testers to verify
3. Specific Requirements
requirements
3.1 External Interfaces
State requirements that are externally perceivable by
3.2 Functions users, operators, or externally connected systems
3.3 Performance Requirements
Requirements should include, at a minimum, a
3.4 Logical Database Requirements description of every input (stimulus) into the system,
3.5 Design Constraints every output (response) from the system, and all
functions performed by the system in response to an
3.6 Software System Quality Attributes input or in support of an output
3.7 Object Oriented Models
(a) Requirements should have characteristics of
4. Appendices high quality requirements
5. Index (b) Requirements should be cross-referenced to
their source.
(c) Requirements should be uniquely identifiable
(d) Requirements should be organized to
maximize readability
85
SRS Section 3
Detail all inputs and outputs
(complement, not duplicate, information presented in section 2)
Examples: GUI screens, file formats
1. Introduction
2. Overall Description
Include detailed specifications of each
3. Specific Requirements use case, including collaboration and
3.1 External Interfaces other diagrams useful for this purpose
86
SRS Section 3 - alternatives
87
WHAT NEXT?
88
What Next?
What next?
RE activities in details
(3) Modeling Requirements
(3) Requirements Verification and Validation
(4) Requirements Management
(4) Requirements Traceability
(4) Requirements Variability and Software Product Lines
(5) Test
(5) Requirements Management in Practice with Polarion
89
Some Training
Rate these requirements