Title: Requirements Elicitation
1Requirements Elicitation
- Chapter 4
- Object-Oriented Software Engineering
- Using UML, Patterns, and Java, 2nd Edition
- By B. Bruegge and A. Dutoit
- Prentice Hall, 2004.
2Requirements Elicitation Activities
- Identifying Actors
- Identifying Scenarios
- Identifying Use Cases
- Refining Use Cases
- Identifying Relationships between Actors and Use
Cases - Identifying Initial Analysis Objects
- Identifying Nonfunctional Requirements
3Identifying Actors
- Actors person or machine using the system in a
particular role - Actors usually correspond to existing roles
within the client organization - Related roles can be grouped together according
to viewpoints - Guide Questions
- Which user groups are supported by the system to
perform their work? - Which user groups execute the systems main
functions? - Which user groups perform secondary functions,
such as maintenance and administration? - With what external hardware or software system
will the system interact? - Watch out for confusion between actors and objects
4Identifying Scenarios
- Scenario
- A narrative description of what people do and
experience as they try to make use of computer
systems and applications Carrol, Scenario-based
Design, 1995 - Informal description of a single feature from the
viewpoint of a single actor - Types of Scenarios
- As-is scenarios describes current situation
- Visionary scenarios describes future system
- Evaluation scenarios describes user tasks for
evaluating the system (acceptance criteria) - Training scenarios introduces new users to the
system
5Heuristics for Identifying Scenarios
- Ask yourself or the client the following
questions - What are the primary tasks that the system needs
to perform? - What data will the actor create, store, change,
remove or add in the system? Who else can modify
this data? - What external changes does the system need to
know about? - What changes or events will the actor of the
system need to be informed about? - However, dont rely on questionnaires alone.
- Insist on task observation (ethnography) if the
system already exists - Ask to speak to the end user, not just to the
software contractor - Expect resistance and try to overcome it
6Scenario Example Warehouse on Fire
- Bob, driving down main street in his patrol car
notices smoke coming out of a warehouse. His
partner, Alice, reports the emergency from her
car. - Alice enters the address of the building, a brief
description of its location (i.e., north west
corner), and an emergency level. In addition to a
fire unit, she requests several paramedic units
on the scene given that area appear to be
relatively busy. She confirms her input and waits
for an acknowledgment. - John, the Dispatcher, is alerted to the emergency
by a beep of his workstation. He reviews the
information submitted by Alice and acknowledges
the report. He allocates a fire unit and two
paramedic units to the Incident site and sends
their estimated arrival time (ETA) to Alice. - Alice received the acknowledgment and the ETA.
7Observations about Warehouse on Fire Scenario
- Concrete scenario
- Describes a single instance of reporting a fire
incident. - Does not describe all possible situations in
which a fire can be reported. - Participating actors
- Bob, Alice and John
8Identifying Use Cases
- Use Case
- Specifies all possible scenarios for a given
functionality - Initiated by an actor
- Motivations for use cases
- Generalizing related scenarios help developers
define the scope of the system - The role of each user of the system is clarified
- Use Case Descriptions
- Entry and exit conditions
- Flow of events
- Quality requirements
9Heuristics How do I find use cases?
- Select a narrow vertical slice of the system
(i.e. one scenario) - Discuss it in detail with the user to understand
the users preferred style of interaction - Select a horizontal slice (i.e. many scenarios)
to define the scope of the system. - Discuss the scope with the user
- Use illustrative prototypes (mock-ups) as visual
support - Find out what the user does
- Task observation (Good)
- Questionnaires (Bad)
10Order of steps when formulating use cases
- First step name the use case
- Use case name ReportEmergency
- Second step Find the actors
- Generalize the concrete names (Bob) to
participating actors (Field officer) - Participating Actors
- Field Officer (Bob and Alice in the Scenario)
- Dispatcher (John in the Scenario)
- Third step Then concentrate on the flow of
events - Use informal natural language
11Use Case Example ReportEmergency
- Use case name ReportEmergency
- Participating Actors
- Field Officer (Bob and Alice in the Scenario)
- Dispatcher (John in the Scenario)
- Exceptions
- The FieldOfficer is notified immediately if the
connection between her terminal and the central
is lost. - The Dispatcher is notified immediately if the
connection between any logged in FieldOfficer and
the central is lost. - Flow of Events on next slide.
- Special Requirements
- The FieldOfficers report is acknowledged within
30 seconds. The selected response arrives no
later than 30 seconds after it is sent by the
Dispatcher.
12Use Case Example ReportEmergencyFlow of Events
- The FieldOfficer activates the Report Emergency
function of her terminal. FRIEND responds by
presenting a form to the officer. - The FieldOfficer fills the form, by selecting the
emergency level, type, location, and brief
description of the situation. The FieldOfficer
also describes possible responses to the
emergency situation. Once the form is completed,
the FieldOfficer submits the form, at which
point, the Dispatcher is notified. - The Dispatcher reviews the submitted information
and creates an Incident in the database by
invoking the OpenIncident use case. The
Dispatcher selects a response and acknowledges
the emergency report. - The FieldOfficer receives the acknowledgment and
the selected response.
13Identifying Use Cases
- Writing Guide
- Choose proper name use verb phrases indicate
users objective - Name actors with noun phrases
- Clearly distinguish actors actions from systems
actions - Use active voice to phrase steps in flow of
events - The causal relationship between steps should be
clear - Describe complete user transaction
- Describe exceptions separately
- Do not describe the user interface
- Use cases should not exceed 2-3 pages break up
using ltltincludegtgt and ltltextendsgtgt relationships
14Refining Use Cases
- Goal completeness and correctness
- Refining use case descriptions leads to other use
cases and clarifies system boundaries - Entry and exit conditions additional use cases
are identified as entry and exit conditions are
refined - Flow of events discussing flow of events
clarifies system boundaries - Quality requirements elicit nonfunctional
requirements in the context of this particular
functionality - Refinements
- Details of objects in the system
- Low-level interactions between actors and system
- Access rights
- Missing exceptions
- Common functionality among use cases
15Refining Use Cases
- Heuristics
- Use scenarios to communicate with users and
validate functionality - Refine a single scenario to understand users
assumptions - Define many high-level scenarios to determine
scope of the system - Use mock-ups or prototypes for visual support
- Present user with a range of alternatives
- Detail a broad vertical slice when scope of
system and user preferences are well-understood
16Relationships Between Actors and Use Cases
- Relationships between actors and use cases
- ltltinitiategtgt
- ltltparticipategtgt
- Determines access rights
- Who can initiate a functionality
- Who else is involved in this functionality
- Relationships between use cases
- Heuristics for making use cases shorter and
simpler to understand - ltltincludegtgt
- For factoring out common functionality
- Explicitly invoked from the including use case
- ltltextendgtgt
- For specifying exceptions
- Entry conditions of the extending use case
determine when it is used - Caveat use discretion when applying these
decompositions (a few longer use cases are
sometimes easier to understand than many short
ones)
17ltltIncludegtgt Functional Decomposition
- Problem
- A function in the original problem statement is
too complex to be solvable immediately - Solution
- Describe the function as the aggregation of a
set of simpler functions. The associated use case
is decomposed into smaller use cases
18ltltIncludegtgt Reuse of Existing Functionality
- Problem
- There are already existing functions. How can we
reuse them? - Solution
- The include association from a use case A to a
use case B indicates that an instance of the use
case A performs all the behavior described in the
use case B (A delegates to B) - Example
- The use case ViewMap describes behavior that
can be used by the use case OpenIncident
(ViewMap is factored out)
Base Use Case
Supplier Use Case
Note The base case cannot exist alone. It is
always called with the supplier use case
19ltExtendgtgt Association for Use Cases
- Problem
- The functionality in the original problem
statement needs to be extended. - Solution
- An extend association from a use case A to a use
case B indicates that use case B is an extension
of use case A. - Example
- The use case ReportEmergency is complete by
itself , but can be extended by the use case
ConnectionDown for a specific scenario in which
the user cannot communicate with the dispatcher
Note The base use case can be executed without
the use case extension in extend associations.
20Generalization association in use cases
- Problem
- You have common behavior among use cases and want
to factor this out. - Solution
- The generalization association among use cases
factors out common behavior. The child use cases
inherit the behavior and meaning of the parent
use case and add or override some behavior. - Example
- Consider the use case ValidateUser, responsible
for verifying the identity of the user. The
customer might require two realizations
CheckPassword and CheckFingerprint
Parent Case
Child Use Case
21Identifying Initial Analysis Objects
Le
v
el 1
Top Level Use Case
A and B are called Participating Objects
22Use Cases can be used by more than one object
Le
v
el 1
Top Level Use Case
Level 2 Use Cases
Le
v
el 2
Le
v
el 2
Level 3 Use Cases
Le
v
el 3
Le
v
el 3
Le
v
el 3
Operations
Le
v
el 4
Le
v
el 4
A
B
Participating Objects
23Identifying Initial Analysis Objects
- Identify the participating objects to create the
initial analysis object model - Maintaining glossary of objects minimizes
potential confusion in terminology between users
and developers - Heuristics
- Terms the needed clarification (by developer or
user) - Recurring nouns in use cases
- Real-world entities and resources that system
must track - Use cases
- Data sources or sinks
- Artifacts with which user interacts
- Use application domain terms
- Cross-check
- Eliminate ambiguity verify that objects with the
same name refer to the same concept - Maintain consistency verify that objects do not
refer to the same concept using different names - Eliminate objects not involved in any use cases
24Identifying Nonfunctional Requirements(FURPS
Classification Scheme)
- Quality Requirements
- Usability
- Reliability/Dependability
- Safety
- Security
- Survivability
- Performance
- Response Time
- Throughput
- Availability
- Accuracy
- Supportability
- Adaptability
- Maintainability
- Portability
- Pseudo Requirements
- Implementation
- Interface
- Operations
- Packaging
- Legal
25Identifying Nonfunctional Requirements
- Heuristics
- Use a taxonomy (e.g., FURPS) to generate
checklists - Give different checklists to users in appropriate
roles - Checklists vary depending on application domain
26Nonfunctional Requirements Trigger Questions
- User interface and human factors
- What type of user will be using the system?
- Will more than one type of user be using the
system? - What sort of training will be required for each
type of user? - Is it particularly important that the system be
easy to learn? - Is it particularly important that users be
protected from making errors? - What sort of input/output devices for the human
interface are available, and what are their
characteristics? - Documentation
- What kind of documentation is required?
- What audience is to be addressed by each
document? - Hardware considerations
- What hardware is the proposed system to be used
on? - What are the characteristics of the target
hardware, including memory size and auxiliary
storage space?
27Nonfunctional Requirements, ctd
- Performance characteristics
- Are there any speed, throughput, or response time
constraints on the system? - Are there size or capacity constraints on the
data to be processed by the system? - Error handling and extreme conditions
- How should the system respond to input errors?
- How should the system respond to extreme
conditions? - System interfacing
- Is input coming from systems outside the proposed
system? - Is output going to systems outside the proposed
system? - Are there restrictions on the format or medium
that must be used for input or output?
28Nonfunctional Requirements, ctd
- Quality issues
- What are the requirements for reliability?
- Must the system trap faults?
- What is the maximum time for restarting the
system after a failure? - What is the acceptable system downtime per
24-hour period? - Is it important that the system be portable (able
to move to different hardware or operating system
environments)? - System Modifications
- What parts of the system are likely candidates
for later modification? - What sorts of modifications are expected?
- Physical Environment
- Where will the target equipment operate?
- Will the target equipment be in one or several
locations? - Will the environmental conditions in any way be
out of the ordinary (for example, unusual
temperatures, vibrations, magnetic fields, ...)?
29Nonfunctional Requirements, ctd
- Security Issues
- Must access to any data or the system itself be
controlled? - Is physical security an issue?
- Resources and Management Issues
- How often will the system be backed up?
- Who will be responsible for the back up?
- Who is responsible for system installation?
- Who will be responsible for system maintenance?
30Constraints (Pseudo Requirements)
- Constraint
- Any client restriction on the solution domain
- Examples
- The target platform must be an IBM/360
- The implementation language must be COBOL
- The documentation standard X must be used
- A dataglove must be used
- ActiveX must be used
- The system must interface to a papertape reader
31How to Specify a Use Case (Summary)
- Name of Use Case
- Actors
- Description of Actors involved in use case)
- Entry condition
- This use case starts when
- Flow of Events
- Free form, informal natural language
- Exit condition
- This use cases terminates when
- Exceptions
- Describe what happens if things go wrong
- Special Requirements
- Nonfunctional Requirements, Constraints
32Additional slides
33Managing Requirements Elicitation
- Negotiating specifications
- Maintaining traceability
- Tool support
- Requirements validation
34Negotiating Specifications (JAD)
- Use case modeling is useful in requirements
elicitation, but it is not the only activity - Requirements have to be identified and negotiated
between different stakeholders - JAD Joint Application Design
- A moderated meeting with all stakeholders
participating - Users, clients, developers trained facilitator
- Leverages group dynamics of face-to-face meetings
- Developers get to understand application domain
- Users get to understand potential solution domain
tradeoffs
35JAD Activities
- Project definition
- Facilitator determines objectives and scope of
project through interviews with project manager
and client - Research
- Facilitator interviews present and future users
- Facilitator gathers information about application
domain - Facilitator creates initial high-level use cases
- Facilitator creates initial list of problems
- Preparation
- Facilitator creates Working Document, agenda and
presentation materials - Facilitator forms team with adequate
representation from all stakeholders
36JAD Activities
- Session
- Facilitator guides team in creating the
requirements specification - Discover new requirements
- Classify and organize requirements
- Prioritize requirements
- Validate requirements
- Derive use cases
- Activities are repeated until closure is achieved
- Final document preparation
- Facilitator prepares Final Document
- Team reviews and approves Final Document
37JAD Facilitator
- Qualifications of JAD facilitator is crucial
- Must keep the discussion within the scope of the
project - Discern wants from needs
- Keep the discussion within the application domain
to avoid prescribing requirements that restrict
the solution space unnecessarily (pushing
specific technology, methodology or language) - Mediate disputes before they get out of hand
- Watch out for political influences and hidden
agendas
38Maintaining Traceability
- Traceability the ability to follow the life of a
requirement as it is translated into design and
then implementation and test cases - The system is complete when all requirements can
be traced to implementation - Traceability also enables developers to uncover
the rationale behand certain requirements and
design decisions - Traceability is harder for nonfunctional
requirements - Traceability is difficult to maintain manually
- Need to maintain cross-references between
different artifacts (requirements, design
documents, code, test plan, user documentation) - Need tool support
39Tool Support
- Requirements for Managing Requirements
- Store requirements in a shared repository
- Provide multi-user access
- Automatically create a system specification
document from the repository - Allow change management
- Provide traceability throughout the project
lifecycle
40Requirements Validation
- Activity involving the client and user
- Requirements validation is a critical step in the
development process, usually after requirements
engineering or requirements analysis. Also at
delivery (client acceptance test).
41Requirements Validation Criteria
- Completeness
- All possible scenarios through the system are
described, including exceptions - Consistency
- There are no contradicting requirements
- Clarity/Unambiguity
- The specification can only be interpreted one way
- Correctness
- Requirements represent accurately the system the
client needs - Realism
- The system can be implemented within constraints
- Verifiability
- Tests can be designed to demonstrate the system
fulfills its requirements - Traceability
- Requirements can be traced to system functions
- System functions can be traced to requirements
- Dependencies among requirements, system
functions, and everything else in between can be
tracked.
42Summary
- The requirements process consists of requirements
elicitation and analysis. - The requirements elicitation activity is
different for - Greenfield Engineering, Reengineering, Interface
Engineering - Scenarios
- Great way to establish communication with client
- Different types of scenarios As-Is, visionary,
evaluation and training - Use cases Abstraction of scenarios
- Pure functional decomposition is bad
- Leads to unmaintainable code
- Pure object identification is bad
- May lead to wrong objects, wrong attributes,
wrong methods - The key to successful analysis
- Start with use cases and then find the
participating objects - If somebody asks What is this?, do not answer
right away. Return the question or observe the
end user What is it used for? - Use case modeling is a part of the requirements
elicitation process, not the entire process
itself.