45
REQUIREMENT ANALYSIS AND SPECIFICATION Sanjeev Sarma, Webx 1

Requirement Analysis

Embed Size (px)

DESCRIPTION

Best Practices for Gathering, Analysing and Modeling Business Requirements

Citation preview

Page 1: Requirement Analysis

REQUIREMENT ANALYSIS AND SPECIFICATION

Sanjeev Sarma, Webx

1

Page 2: Requirement Analysis

Introduction• Requirements Gatherings

– Goals and Challenges– Standard Approaches– Example Requirements List– Documenting Operational Requirements

• Traditional Deliverables– Requirements Specification Documents– Analysis Diagrams:

• Context Diagram, • Entity Relationship Diagram, • Data/Control Flow Diagram

– Prototype

2

Page 3: Requirement Analysis

Requirements Gathering

Analyzing Business Requirements

3

Page 4: Requirement Analysis

Goals of Requirements Gathering

4

Find out what the users need Document needs in a Requirements

Specification Avoid premature design assumptions Resolve conflicting requirements Clarify ambiguous requirements Eliminate redundant requirements Discover incomplete or missing requirements Separate functional from nonfunctional

requirements Ensure Requirements Traceability

Page 5: Requirement Analysis

Requirement Specifications seldom clearly capture customer needs

5

What user wanted How customer described it How analyst specified it How designer implemented it

Page 6: Requirement Analysis

Challenges in Requirements Gathering

6

Consider a scenario illustrating the normal state of flux: Often you are using new business procedures, and your job has changed to head development of a brand new application your company has announced, and you are scheduling training for you and your team to master a new computer environment and new software development techniques and new tools using a new programming language, how do you figure out and document how the new application is supposed to work in a way that is clearly understood by:

end users, analysts, training staff customers, designers, support staff marketing staff, implementers, maintenance staff,

managers, testers, . . . ?

Page 7: Requirement Analysis

Standard Approaches for Requirements Gathering

7

Obtain requirements through user interviews Gathering representatives of stakeholders:

Executives Developer Maintenance users support staff ...

in one room at during uninterrupted session(s) to decide on requirements under an experienced leader/consensus maker:Joint requirements planning (JRP)

focus on what the system will doJoint application design (JAD) focus on how the system will work produce a document which

includes a list of requirements Developing a Rapid Prototype

Page 8: Requirement Analysis

Example Requirements List 1 (1 of 3)

8

Requirement Comments

The system will support client inquiries from 4 access points: in person, paper-based mail, voice communication, and electronic communication (Internet, dial-up, and LAN/WAN

Four access points are how; we should focus on who needs access and from where

The telephone system must be able to support an 800 number system

Can't use 888 or 877? Missing who needs what kind of access from where

The telephone system must be able to handle 97,000 calls/yr. and must allow for a 15% annual growth. It is estimated that 19% of these calls will be responded to in an automated manner and 81% will be routed to call center staff for response. 50% of calls can be processed without reference to the electronic copy of the paper file, and approximately 50% will require access to system files.

Valuable statistics. This requirement is actually pretty good.

For the calls that require access to system information, response times for the electronic files must be less than 20 seconds for the first image located on the optical disk, less than 3 seconds for electronic images on a server, and less than 1 second for data files.

"optical disk" is a design assumption. Response times are good non-functional requirements if not linked to design assumptions (hardware device types).

Page 9: Requirement Analysis

Example Requirements List 1 (2 of 3)

9

Requirement Comments

The telephone system must be able to support voice recognition of menu selections, touch-tone menu selections, and default to a human operator. The telephone menu will sequence caller choices in order of most frequently requested information to the least requested

Pretty good one. Can you find anything wrong?

The telephone system must be able to provide a voice response menu going from a general menu to a secondary menu.

This seems to be trying to provide some pretty obvious advice to a dumb designer

The system must allow for the caller to provide address information through a digital recording and to indicate whether it is permanent.

"Through a digital recording"? This is a design assumption

The system must allow for the caller to provide address information through voice recognition and to indicate whether it is permanent.

Sound familiar? (It's redundant)

The telephone system must be able to store and maintain processor IDs and personal identification numbers to identify callers and to route calls properly to the appropriate internal response telephone.

Simplify it: "The system must be able to identify callers and route calls to the appropriate internal response telephone".

The telephone system must be able to inform callers of the anticipated wait time based on the number of calls, average duration of calls, and the number of calls ahead of them.

Great!

Page 10: Requirement Analysis

Example Requirements List 1 (3 of 3)

10

Requirement Comments

The journal will contain entries for key events that have occurred within the administration of an individual's account. The system will capture date, processor ID, and key event description. The system will store pointers to images that are associated with a journal entry as well as key data system screens that contain more information regarding the entry.

This is a design for a journal. Why have it? What is its purpose?

If an individual double-clicks on an event in a member's journal, the system will display the electronic information and the images associated with the event.

Double-click is a user interface design assumption

The system will restrict options on the information bar by processor function. When an icon is clicked, the screen represented by the icon will be displayed and the system will display appropriate participant information.

This one has many user interface design assumptions.

Note: Each requirement should have a number to provide traceability.

Page 11: Requirement Analysis

Example Requirements List 2 (1 of 2)

11

Requirement Comments

6.7.1.2 The system must provide the capability to capture all of the customer transactions for fiscal year

Too vague. Implies fiscal year has some impact on how customer transactions are organized, but does not specify what that is. Implies some data entry, but needs to be stated more specifically. May be trying to make a statement about volume, meaning old transactions can't be archived until they are a year old?

6.7.1.3 The system will provide restricted remote inquiry access (via dial-in) to view images and data separately or simultaneously

Saying "restricted" is OK, but details about the restriction (who can, who can't) should be stated clearly in this context. Also vague is the reference to remote inquiry. How remote? Saying "remote access" when referring to mobile employees working in the field but still within a couple of miles of the office or worldwide access. Can have huge implications on system.

6.7.1.4 The system will barcode documents automatically prior to distribution. At a minimum, the codes will be used to identify to which work queue the documents should be routed within the organization when they are returned

Makes several technical design assumptions. Barcoding is a solution, not a requirement. This system probably needs a way to identify each document uniquely, but it doesn't have to be barcodes. If all existing systems use document barcoding (not the case with this system), should write a nonfunctional requirements that states, "Unique identification of all documents will be done through barcoding". By specifying barcoding in the functional specifications, changing to glyphs, optical character recognition (OCR) will be more difficult. The reference to queues makes an assumption about a workflow-package-oriented system. Better to state: "At a minimum, the unique id will ensure routing to a specific worker in the organization when documents are returned."

Page 12: Requirement Analysis

Example Requirements List 2 (2 of 2)

12

Requirement Comments

6.7.1.5 When a workflow is initiated, the system must be able to pre-fetch the documents that are in electronic image format by document type or grouping of documents by process

Look at references to workflow. Requirements document has specified a workflow solution! This whole entry is suspicious. Seems to be saying that we must cache documents by two different criteria: by type or by process. Criteria are good requirements, but caching (pre-fetching) is a solution to address performance problems.

6.7.1.6 The system must create an entry in the journal file whenever a letter is created

Assumes presence of a journal file containing entries inserted when a letter is created. Seems focused on front end ("do this") instead of back end ("in order to get this"). Why put entries in a journal file? To create a list of all letters created, when and by whom? This would make a better, clearer requirement.

6.7.1.7 System must maintain list of current, open work processes and identify work process to be executed and workflow queue for process. When documents are scanned, system determines whether there is a process open for that SSN. If there is, the system routes document to appropriate workflow queue, displays work process script, and highlight current work process.

Seems to be focused on how rather than what. Instead of specifying the steps a system must go through, clearly document the end in mind. Example: "When a new document image is brought into the system, it should be routed to the worker who has the account open for the same SSN as the new document and should be made obvious to that worker. If no worker has an open account, the document should be made available to any worker."

Page 13: Requirement Analysis

Obtaining Operational Requirements

13

Problems with traditional ways of specifying problems:

customer may not adequately convey the needs of the user. developer may not be an expert in the application domain, which

inhibits communications. users and customers may not understand the requirements

produced by the developer developer's requirements specifications typically specifies system

attributes such as: Functions Design constraints Quality attributes System interfaces and Performance factors

but typically contains little or no information concerning operational characteristics of the specified system.

Page 14: Requirement Analysis

Guidelines for Operational Concept Document

14

Operational Concept Document (OCD) describes the mission of the system, its operational and support environments, and the functions and characteristics of the computer system within an overall system.Several guidelines and standards exist to prepare an OCD: Mil-Std 498 for Department of Defense SW development IEEE Standard 1498 for commercial SW development, AIAA OCD 1992 for the American Inst. of Aeronautics and Astronautics (for embedded real-time systems) ConOps 1997 Concept of Operations Document Guidelines proposed by Fairley and Thayer [FT97] because they felt the above guidelines were Systems-oriented and developer-oriented instead of user-oriented.

Page 15: Requirement Analysis

The Concept of Operations Document

15

Identifies classes of users and modes of operation

Normal mode Emergency mode Maintenance mode Backup mode Degraded mode Diagnostic mode

Users communicate essential needs desirable needs -- prioritized optional needs -- prioritized

Prioritized user needs provide the basis for establishing an incremental development process, and making trade-offs among operational needs, schedule and

budget.

Page 16: Requirement Analysis

Concept Analysis

16

Concept Analysis Team, include representatives from User organization Training Buyer organization Operational support Developer organization or Development Experts/ConsultantsResults of concept analysis are recorded in the ConOps document

written in narrative prose using users' language, and using visual forms (diagrams, illustrations, graphs, etc.) wherever possible.

Each operational scenario needs a test scenario to validate the system in user's environment. Validate proposed system by walking thru all scenarios, include both normal and abnormal operations:

Exception handling Stress load handling, Handling incomplete data Handling incorrect data.

Page 17: Requirement Analysis

Outline for a Concept of Operations Document

17

1 Scope1.1 Identification1.2 System Overview1.3 Document Overview

2 Referenced Documents3 The Current System or Situation

3.1 Background, Objectives, & Scope3.2 Operational Policies & Constraints3.3 Description3.4 Modes of Operation3.5 User Classes

3.5.1 Organizational Structure3.5.2 Profiles of User Classes3.5.3 Interactions3.5.4 Other Involved Personnel

3.6 Support Environment4 Justification for and Nature of Proposed

Changes & New Features4.1 Justification4.2 Description4.3 Priorities among Changes/ Features4.4 Changes/Features Considered but

Not Included4.5 Assumptions and Constraints

5 Concepts of Operations for the New or Modified Proposed System 5.1 Background, Objectives & Scope5.2 Operational Policies & Constraints5.3 Description of Proposed System5.4 Modes of Operation5.5 User Classes

5.5.1 Organization Structures5.5.2 Profiles of User Classes5.5.3 Interactions among User Classes

5.6 Other Involved Personnel5.7 Support Environment

6 Proposed Operational Scenarios7 Summary of Impacts

7.1 Operational Impacts7.2 Organizational Impacts7.3 Impacts During Developments

8 Analysis of Proposed System8.1 Summary of Improvements8.2 Disadvantages & Limitations8.3 Alternatives/Tradeoffs considered

9 Notes, Appendices, and Glossary

Page 18: Requirement Analysis

Rapid Prototype

18

[www.dilbert.com ]

Having a prototype during requirements phase gives you something to work from when communicating with the users and client, and results in a user-centered GUI design

Page 19: Requirement Analysis

Traditional Expressions of Functional Requirements

19

Requirements specifications Hard to read. Contract-like.

Context Diagram Specifies users, software, hardware that interface with

system Data-flow Diagrams (DFD)

Useful for technical people but tend to confuse users Useful in design of non-object-oriented systems

Entity-relationship diagrams (ERD) Critical to database design but are not easily understood by

users Prototypes

Good communication tool to obtain information from user. Great for proof-of-concept tasks. Useful in developing user interface designs.

Page 20: Requirement Analysis

Unified Modeling Language

(UML)

20

Page 21: Requirement Analysis

UML Diagrams

21

Instead of the Context, Data-Flow and Entity-Relationship Diagrams used in Structured Analysis, UML produces 9 types of diagrams Use Case Diagram Sequence Diagram Collaboration Diagram State chart Diagram Activity Diagram Class Diagram Object Diagram Component Diagram Deployment Diagram

Page 22: Requirement Analysis

Use Cases

22

Page 23: Requirement Analysis

History of Use Cases

23

Ivar Jacobson and his team at Ericsson in Sweden introduced Use Cases in their book: I. Jacobson, M. Christerson, P. Jonsson, and G. Overgaard.

Object-Oriented Software Engineering: A Use Case Driven Approach, ACM Press, 1992.

Use Cases were included as part of their overall system development lifecycle methodology, called Objectory, which was sold to Rational Software. Now Use Cases are part of the Rational Unified Process, created by the "three amigos": I. Jacobson, G. Booch and J. Rumbaugh. The Unified

Software Development Process, Addison-Wesley, 1999.

Page 24: Requirement Analysis

What is a Use Case?

24

The Use Cases describe the behavior of a system from a user's standpoint using actions and reactions.

The Use Case Diagram defines the system's boundary, and the relationships between the system and the environment: different human users roles interact with our

system other software systems/applications hardware systems/devices

Use Cases support the specification phase by providing a means of capturing and documenting requirements

Page 25: Requirement Analysis

Use Case Deliverables

25

There are two parts to document a use case: the use case diagram,

provides visual overview of important interactions captures scope (identifies external entities)

the use case itself documents in a textual form the details of the

requirements, what the use case must do. A use case is actually a page or two of text representing

each oval in the use case diagram A project should have a standard template for use

cases.

Page 26: Requirement Analysis

Use Case Diagram

26

Buyer

Advisor

Seller

Sell Property

Real Estate System

actor

interaction

use case

system

Page 27: Requirement Analysis

Use Case Documentation Template

27

Use Case Number: A unique numeric identifier Use Case Name: A unique descriptive identifier

Iteration: Facade (Outline and high-level description), Filled (Broader, deeper), Focused (Narrower), Finished

Summary: Briefly state the purpose of the use case in one or two sentences to provide a high-level definition of the functionality provided by the use case.

Basic Course of Events: 4. Include the following: 4.1 What interaction the use case has with

the actors 4.2 What data is needed by the use case 4.3 When and how the use case starts and

ends 4.4 The normal sequence of events for the

use case 4.5 The description of alternate or

exceptional flows, what happens if ... 5. The description of each step grows in detail

as analysis progresses

1. This is a numbered list. The use case number is used togetherfor with this number to provide requirements traceability

2. Write this as a flow of events describin what the system should do, not how the system should do it.

3. Write it in the language of the domain, not technical jargon

Alternative Paths: What happens if ... invalid information is entered, unusual types of processing occurs, or uncommon conditions occur, how is the flow completed?

Exception Paths: What happens if... an error occurs, how is the flow affected?

Extension Points: Describes an <<extend>> relationship, shows steps which are extended by optional steps in another case

Trigger: Describe entry criteria for use case, may describe business need, may be time-related, or completion of other case

Assumptions: Critical section for project manager. Things (out of scope of system) you assume to be true but might not be true

Preconditions: List things that must be in place before interaction can occur. (Part of contract between use case & outside world.

Postconditions: List things that will be satisfied if use case is completed successfully. Independent of alternative paths taken.

Related Business Rules: Written and unwritten company business rules that relate to requirements presented in this use case

Author: This is placed at the bottom, together with the date to allow critical information to be speed read

Date: Facade, Filled, Focused, Finished dates

Page 28: Requirement Analysis

Use Case Documentation Example

28

Use Case Number: 1 Use Case Name: Sell Property

Iteration: Filled (Four stages of iteration are Facade, Filled, Focused, and Finished)

Summary: System Context Use Case. The seller lists the property, a buyer purchases the property, and the agent guides them through the process and offers advice, caution, and recommendations

Basic Course of Events: 9. System responds by notifying seller and seller's agent

10. Seller responds to the offer with a counteroffer.

11. System responds by notifying buyer and buyer's agent.

12. Buyer and seller agree to terms13. System responds by recording the

agreement14. Buyer indicates a loan is required15. System responds by locating an appropriate

loan provider16. Buyer and loan provider agree to loan terms.17. System responds by recording terms of loan18. Buyer and seller close on property.19. System responds by recording details of

close.

1. Seller selects an agent2. System responds by assigning an agent and

notifying the seller's agent.3. Seller lists the property to sell.4. System responds by displaying this property in

the property listing and linking it for searches5. Buyer selects an agent.6. Buyer reviews the property listings by entering

search criteria7. System displays properties matching buyer's

search criteria8. Buyer finds a property and makes an offer on it.

Alternative Paths: N/A

Exception Paths: N/A

Extension Points: N/A

Trigger: N/A

Assumptions: N/A

Preconditions: N/A

Postconditions: N/A

Related Business Rules: N/A

Author: Rumpel Stilskin

Date: March 10, 2001 – Facade; April 20, 2001 -- Filled

Page 29: Requirement Analysis

A Simpler Use Case Template

29

A simpler template for Use Case documentation is recommended by Terry Quatrani [TQ98]

For each use case:X Flow of Events for the <name> Use

CaseX.1 PreconditionsX.2 Main FlowX.3 Subflows (if applicable)X.4 Alternative Flowswhere X is a number from 1 to the number of the use case

Page 30: Requirement Analysis

Associations in Use Case Diagram

30

Associations can exist between an actor and a use case, between use cases, and between actors

Types of Use Case Associations Communicates between actor and use case

named or unnamed relationship showing participation of actor in use case, use a solid line connecting actor to use case

Generalization between actors Adornments = Stereotyped Associations between use cases

<<extend>> indicates relationship between use cases in which a special use case (the non-arrow end) extends an original use case (the arrow end)

<<include>>reuses steps in a use case instead of cut-and-pasting steps into multiple use case documents, by pulling out common steps into a new use case and specifying with an arrowed line the <<include>> association between this new use case and those use cases requiring the steps

<<uses>>An instance of the source use case includes behavior described by the targetShows a stereotyped generalization relationship between use cases

Page 31: Requirement Analysis

Example of Generalization between Use Case Actors

31

Service Representative

Customer Service Representative Field Service Representative

Page 32: Requirement Analysis

Example of Communicates Use Case Relationship

32

Buyer

Sell Property

Buyer

Sell PropertyTriggers

Page 33: Requirement Analysis

Example <<uses>> and <<extends>> Use Case Relationships

33

Remote Customer

Transfer by computer

Transfer

<<extends>>Local Customer

Identification

<<uses>>

Page 34: Requirement Analysis

Example <<include>> and <<extends>> Use Case Relationships

34

Office Administrator

Schedule Customer Appointment

<<extends>><<includes>>

Schedule Recurring Customer AppointmentSchedule Designer

Enter Customer Order

<<includes>>

Page 35: Requirement Analysis

The Use Case View for the Case Study:

Course Registration System

35

Page 36: Requirement Analysis

The Actors

36

In the Course Registration System, answering the questions suggested to find actors yields: Students want to register for courses Professors want to select courses to teach Registrar must create the curriculum and generate a catalog for

the semester Registrar must maintain all the information about courses,

professors, and students Billing System must receive billing information from the system

Actors identified from above: Student – person registered/registering in classes at the

University Professor – person certified to teach classes at the University Registrar – person who maintains the Course Registration

System Billing System – external software system that does student

billing

Page 37: Requirement Analysis

The Use Cases

37

Answering the questions to find use cases yields: The Student actor needs to use the system to register for courses After the course selection process is completed, the Billing System

must be supplied with billing information The Professor actor needs to use the system to select the courses

to teach for a semester, and must be able to receive a course roster from the system

The registrar is responsible for the generation of the course catalog for a semester, and for the maintenance of all information about the curriculum, the students, and the professors needed by the system

Based on the needs, the following cases are identified:1. Register for courses2. Select courses to teach3. Request course roster4. Maintain course information5. Maintain professor information6. Maintain student information7. Create course catalog

Page 38: Requirement Analysis

The Flow of Events (1 of 3)

38

Page 39: Requirement Analysis

The Flow of Events (2 of 3)

39

Page 40: Requirement Analysis

The Flow of Events (3 of 3)

40

Page 41: Requirement Analysis

Use Case Diagram (1 of 2)

41

Page 42: Requirement Analysis

Use Case Diagram (2 of 2)

42

Page 43: Requirement Analysis

Select a Use Case and Sub-Flow

43

Look at a use case: Select Courses to Teach Select a subflow: Add a Course Offering Although the flow is written sequentially, in the real world many

steps may occur concurrentlyThe professor logs onto the Registration System and enters password. The system verifies the password is valid (E1) and prompts the professor to select the current semester or a future semester (E2). The professor enters the desired semester. The system prompts the professor to select the desired activity: ADD, DELETE, REVIEW, PRINT, or QUIT. The professor chooses ADD, the S-1: Add a Course Offering subflow is selected. S-1 Add a Course OfferingThe system displays the course screen containing a field for a course name and number. The professor enters the name and number of a course (E-3). The system displays the course offerings for the entered course (E-4). The professor selects a course offering. The system links the professor to the selected course offering (E-5). The use case then begins again.E-3: An invalid course name/number is entered. The user can re-enter a valid name/number combination or terminate the use caseE-4: Course offerings cannot be displayed. The user is informed that this option is not available at the current time. The use case begins again.E-5: A link between the professor and the course offering cannot be created. The information is saved and the system will create the link at a later time. The use case continues

Page 44: Requirement Analysis

Case Studies

44

Page 45: Requirement Analysis

Thank You

45