6 Requirements Eng
6 Requirements Eng
Topics
2
Software Requirements
A requirement specifies the business functions that the user will be
able to perform using the system-to-be in different “situations”, and
the kind of experience the user will have during this work
– Other concerns, such as how the system will manage the resources
(computing, network, …), how the system will manage and protect user’s
data, etc.
User requirements will often be high-level, vague and incomplete.
They are more like high-level goals, or business goals, rather than
software requirements needed by the developer
To achieve a high-level goal, we must consider what matters, what
are the important parameters, to derive the detailed technical
requirements
Only based on deeper understanding of detailed issues, we can
identify important "scenarios" or "situations" and identify what
parameters should be considered in each situation
Then using these parameters, we decide what the system should do,
or how to respond to this situation (i.e., inputs)
3
Requirements Process
Aspect-Oriented
Requirements
Object-Oriented
Analysis & Design
Structured
Analysis & Design
Agile
Development User
Stories
Requirements gathering
– (a.k.a. “requirements elicitation”) helps the customer to define
what is required: what is to be accomplished, how the system
will fit into the needs of the business, and how the system will be
used on a day-to-day basis
Requirements analysis
– refining and modifying the gathered requirements
Requirements specification
– documenting the system requirements in a semiformal or formal
manner to ensure clarity, consistency, and completeness
5
Practical Requirements Engineering
Test your idea in practice and use the result in further work, iterating
through these creative and evaluative steps until a solution is reached
– No one can know all the constraints for a solution before they go
through the solving experience
6
Requirements and Specification
Describes
problem
Specifi
Requirements Program
Customer cation
Specifies
Analyzes Develops
Software Engineer
9
Problem Example: Safe Home Access
Problem detected: difficult access or unwanted intrusion
10
Requirements as User Stories
A User Story is a requirement expressed from the perspective of an end-user goal.
User Stories follow the same format. They are assembled in a Prioritised Requirements
List.
At a detailed level
As an Investor, I need to see a summary of my investment accounts, So that I can
decide where to focus my attention.
As a tenant, I can unlock the doors to enter my apartment.
11
Requirements as User Stories
A User Story is a well-expressed requirement. Its format has become the
most popular way of expressing requirements in Agile for many reasons:
• It focuses on the viewpoint of a role who will use or impacted by the solution
• It defines the requirement in language that has meaning for that role
• It helps to clarify the true reason for the requirement
• It helps to define high level requirements without necessarily going into low level
detail too early
Preferred tool in agile methods.
Focus on the user benefits, instead on system features as in older, IEEE
Standard 830 type “requirements”.
User stories are less formal and emphasize automated acceptance tests.
12
User Story – the Card Example
From the PRL, User Stories are often printed onto physical cards, for planning
purposes and to help the Solution Development Team monitor progress.
REQ-1 As an authorized user, I will be able to keep the doors by default always locked. 4 points
REQ-2 As an authorized user, I will be able to unlock the doors using a valid key. 7 points
An intruder will not be able to unlock the doors by guessing a valid key;
REQ-3 7 points
the system will block upon a “dictionary attack.”
REQ-4 The door will be automatically locked after being open for a defined period of time. 6 pts
REQ-5 As a user, I will have the door keypad backlit when dark for visibility. 3 pts
REQ-6 Anyone will be able to lock the doors on demand. 2 pts
REQ-7 As a landlord, I will be able at runtime to manage user authorization status. 10 pts
As an authorized user, I will be able to view the history of accesses and investigate
REQ-8 6 pts
“suspicious” accesses.
As an authorized user, I will be able to configure the preferences for activation of
REQ-9 6 pts
household devices.
Note no priorities for user stories (Customer Benefit, Opportunity Size, Competitive
Positioning)
Story priority is given by its order of appearance on the work backlog (described later)
Estimated size points (last column) will be described later
14
Compare to IEEE-830 Style Requirements
Requirements prioritization: From critical to trivial
REQ-10 1 The system should backlit the door keypad when dark.
IEEE Standard 830 style requirements are more formal and cover more scenarios and details
When prioritizing requirements, “important” and “urgent” aspects can be confused
It is also difficult to assign a numeric value of priority to each requirement
– It requires more mental effort than just rank-ordering the requirements in a linear sequence 15
Analyst’s Task: Three Descriptions
Not only refinement of customer requirements, but also feasibility and how
realistic
The requirement
The problem domain
What user wants: The specification
How problem
When valid keycode entered +
Unlock pressed, open the lock; domain behaves: What software-to-be
Automatically lock after a period
of time.
will do (at interface):
Locked If entered number matches one of
stored numbers + Button-1 pressed,
Electromechanical lock
HIGH VOLTAGE / put HIGH voltage on Output-port-1;
Start a timer countdown;
When the timer expires,
LOW VOLTAGE /
put LOW voltage on Output-port-1.
Unlocked
Concern:
It is not obvious that this is the
only or even “correct” solution to
the requirement-posed problem.
Problem Frames tell us what each description should contain and how to verify the concern.
Types of Requirements
1. Functional Requirements
2. Non-functional requirements (or quality requirements)
– The term FURPS+ refers to the non-functional system properties:
• Functionality (security), Usability, Reliability, Performance , Supportability
3. User interface requirements
17
User Interface Requirements
https://arstechnica.com/gadgets/2018/01/with-ink-to-code-microsoft-is-turning-back-of-napkin-sketches-into-software/
18
Example: Safe Home Access
User interface requirement:
The UI must be simple for occasional visitors who will not have time to familiarize or
to study user’s documentation.
Analysis:
If “Unlock” button is not available, then the system could
simply take the first N digits and validate as the key.
If “Unlock” button is available, then the system could take
the last N digits and validate as the key (and ignore any
number >N of previously entered digits).
The advantage of the latter approach is that it allows
correcting for unintentional mistakes during typing, so the
legitimate user can have more opportunities to attempt.
Note that this feature will not help the burglar trying a
dictionary attack.
19
Example: Safe Home Access
Analysis:
When a user types in the key and the system
reports an invalid key, the user may not know
whether the problem is in his fingers or in his
memory: “did I mistype the correct key, or I
forgot the key?”
To help the user in such a situation, we may
propose to include a numerical display that
shows the digits as the user types.
20
Example: Safe Home Access
Analysis:
There are several issues to consider about the
display feature:
• How much this feature would increase the overall cost?
• Would the display make the door device bulky and
inconvenient to install?
• Would it be significantly more sensitive to rain and other
elements?
• Would the displayed information be helpful to an intruder
trying to guess a valid key?
21
Tools for Requirements Eng.
22
Acceptance Tests
Means of assessing that the project success criteria
– The requirements are met as expected
Conducted by the customer throughout the project, not only at the end
An acceptance test describes whether the system will pass or fail the test,
given specific input values
We cannot ever guarantee 100% coverage of all usage scenarios, but
systematic approach can increase the expected degree of coverage
Each requirement describes for a given “situation” (i.e., system inputs), the
output or behavior the system will produce
– The “output” represents the user’s need or business goal
An acceptance test specifies a set of scenarios for determining whether the
(part of the) system meets the customer requirements
An acceptance test case specifies, for a given “situation” or “context”
(defined by current system inputs), the output or behavior the system will
produce in response. See examples here. 23
Sizing the Problem
Work Estimation Strategy
1.Make initial guess for a little part of the work
2.Do a little work to find out how fast you can go
3.Make correction on your initial estimate
4.Repeat until no corrections are needed or work is completed
25
Agile Estimation of Project Effort
1) Prune Section 6 1 day (2pts) 2 points per day
2) Prune Section 4 1.5 days (3pts)
1 = 4 pts (2 days)
3) Prune Section 1 2 days (4pts) 2 = 7 pts (3.5 days)
3 = 10 pts (5 days)
4 = 3 pts (1.5 days)
4) Prune Section 5 2 days (4p) 5 = 4 pts (2 days)
6 = 2 pts (1 day)
5) Prune Section 2 3.5 days (7p)
7 = 4 pts (2 days)
8 = 7 pts (3.5 days)
6) Prune Section 7 2 days (4p) 21 days
Estimated work duration 7) Prune Section 8 3.5 days (7p)
Work backlog
1) Prune Section 6 1 day (2pts) 8) Prune Section 3 5 days (10p)
6) Prune …
Work items
21 days
5 days
List prioritized by the customer Estimated completion date Time
Example User Stories
Identifier User Story Size
REQ-1 As an authorized user, I will be able to keep the doors by default always locked. 4 points
REQ-2 As an authorized user, I will be able to unlock the doors using a valid key. 7 points
An intruder will not be able to unlock the doors by guessing a valid key;
REQ-3 7 points
the system will block upon a “dictionary attack.”
REQ-4 The door will be automatically locked after being open for a defined period of time. 6 pts
REQ-5 As a user, I will have the door keypad backlit when dark for visibility. 3 pts
REQ-6 Anyone will be able to lock the doors on demand. 2 pts
REQ-7 As a landlord, I will be able at runtime to manage user authorization status. 10 pts
As an authorized user, I will be able to view the history of accesses and investigate
REQ-8 6 pts
“suspicious” accesses.
As an authorized user, I will be able to configure the preferences for activation of
REQ-9 6 pts
household devices.
27
Agile Estimation of Project Effort
Agile Prioritization of Work
Instead of assigning priorities, the customer creates an ordered list of user stories
Developers simply remove the top list items and work on them in the next iteration
Work backlog
1) ST-4: Unlock 14 days (7pts)
2) ST-2: Lock 6 days (3pts)
Items pulled by developers into an iteration
3) ST-5: Manage Users 14 days (8pts)
4) ST-7: Set Preferences 10 days (6pts)
6) ST-_:
117 days
1st iteration
20 days
List prioritized by the customer Estimated completion date Time
29
Tradeoff between Customer Flexibility and Developer Stability
Items pulled by developers into an iteration are not subject to further customer
prioritization
Developers have a steady goal until the end of the current iteration
Customer has flexibility to change priorities in response to changing market forces
Step 1:
Remove from the backlog
user stories scheduled for
the next iteration
Work backlog
• ST-4: Unlock 14 days (7pts)
• ST-2: Lock 6 days (3pts)
1) ST-5: Manage Users 14 days (8pts)
2) ST-7: Set Preferences 10 days (6pts)
4) ST-_:
Step 2:
Shift remaining user
stories to the top of the
backlog and allow
customer re-prioritization 117 days
1st iteration
30 days
Work iteration currently in progress Estimated completion date Time
30
References