refining the system definition

88
Rational Requirements Management with Use Cases v5.5 Copyright © 1998-2000 Rational Software, all rights reserved 1 Requirements Management with Use Cases Module 7 Refining the System Definition

Upload: sandeep-ganji

Post on 20-Jan-2015

1.593 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 1

Requirements Management with Use Cases

Module 7Refining the System Definition

Page 2: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 2

Course Outline

0 - About This Course1 - Best Practices of Software Engineering2 - Introduction to RMUC3 - Analyzing the Problem4 - Understanding Stakeholder Needs5 - Defining the System6 - Managing the Scope of the System7 - Refining the System Definition8 - Managing Changing Requirements9 - Requirements Across the Product Lifecycle

Page 3: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 3

Refining the System Definition: Overview

Problem

Solution Space

Problem Space

Needs

Features

SoftwareRequirements

The The Product Product To Be To Be BuiltBuilt

Test Procedures Design User

Docs

Traceability

Page 4: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 4

What Do Software Requirements Specify?

SystemInputs Outputs

Functions

Performance

Environments

Software requirements specify externally observable capabilities and conditions of the system

Page 5: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 5

Specifying the Software Requirements

Features

SoftwareRequirements

Needs

Supplementary Specifications

Supplementary Specifications

Vision Document

Vision Document

TraditionalSRS

TraditionalSRS

OR? ?

The Software Requirements Specification (SRS) defines the complete external behavior and characteristics of the system to be built.

Use-Case Model

Page 6: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 6

Adapted from Alan Davis

Software Requirements Specification

(SRS)

Roles of the SRS

Basis of communication between all parties

Input to design team Input to software test and

quality assurance Input to user documentation Contractual agreement

between parties The software manager’s

reference Controls evolution of system

Page 7: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 7

Features Drive Software Requirements

Feat 63 - the defect tracking system will provide trending information to help the project manager assess project status

Trending information will be charted with a line graph showing time on the x axis, and number of defects found on the y axis.

Trending periods can be entered in units of days, weeks or months.

An example trend reportis shown in Figure 1:

Print StatusReport

Operator ProjectManager

Page 8: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 8

Focus on the Use-Case Model Approach

Supplementary Specifications

Supplementary Specifications

Features

SoftwareRequirement

s

Vision Document

Vision Document

Needs

TraditionalSRS

TraditionalSRSUse-Case Model

Page 9: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 9

How Do Use Cases Help Define Requirements?

A use case models a dialogue between one or more actors and the system.

A use case describes the actions the system takes to deliver something of value to the actor.

A use case is initiated by an actor to invoke a certain functionality in the system.

A use case is a complete and meaningful flow of events, taken from the perspective of a particular actor.

Taken together, all use cases constitute all possible ways of using the system.

Use-Case Model

Page 10: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 10

How to Detail a Use Case Make the description from the “Find Use Cases and

Actors” activity gradually more detailed Decide on the following to ensure consistency

across use cases: How does the use case start? How does the use case terminate? How does the use case interact with actors? How does the use case exchange data with an actor? How does the use case repeat some behavior? Are there any optional situations in a use case’s flow of

events? How should the use case be described so that the

customer and the users can understand it?

Page 11: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 11

<Use-Case Name>

1. Brief Description

2. Flow of Events

Basic Flow of Events

Alternative Flows of Events

3. Special Requirements4. Pre-Conditions

5. Post-Conditions

6. Extension Points

7. Relationships

8. Use-Case Diagrams

9. Other Diagrams/enclosures

<Use-Case Name>

1. Brief Description

2. Flow of Events

Basic Flow of Events

Alternative Flows of Events

3. Special Requirements4. Pre-Conditions

5. Post-Conditions

6. Extension Points

7. Relationships

8. Use-Case Diagrams

9. Other Diagrams/enclosures

Use-Case Report: Template

The Use-Case Report contains information regarding an individual use case within the use-case model.

TP: Use Case Report Template

Page 12: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 12

Use-Case Properties in the Use-Case Report

Name (same as Use-Case-Model Survey) Brief description (same as Use-Case-Model Survey) Flow of events

The use case’s behavior What the actors do, what the system does in response

Special requirements (optional) Requirements that are not covered in flow of events Usually non-functional constraints

Pre-conditions (optional) Constraints on when the use case may start

Post-conditions (optional) Constraints on the system after the use case has ended

Page 13: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 13

Use-Case Properties in the Use-Case Report (cont.)

Extension points (optional) Places in the flow of events to attach extensions

Relationships Associations with actors and with other use cases

Use-Case diagrams (optional) Visual model of all relationships involving this use case

Other Diagrams or enclosures(optional) Interaction, activity, or other diagrams Pictures of the user interface

• Hand-drawn sketches or screen-dumps from an user-interface prototype, clarifying the use case

Page 14: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 14

Sample Basic Flow of EventsRecycle Items

1. Start of Use CaseThe use case begins its flow of events when a can, bottle, or crate (a deposit item) is inserted by the customer. 2. Determine TypeThe system reads a bar code on the deposit item. It compares the code with a list of valid codes to determine whether this is a valid deposit item, and which type of deposit item it is. 3. Receive Next Deposit ItemOnce the type has been determined, the system updates the daily total for that deposit item type. Then, the system prepares itself to receive the next item. If an item is inserted, continue at 2. Determine Type.

Page 15: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 15

Sample Basic Flow of Events (cont.)

4. Prepare to Print ReceiptAfter having inserted a number of deposit items, the customer requests a receipt by pressing the receipt button on the customer panel. The system retrieves all information to be written on the receipt. For each type of item inserted, the system retrieves how many items of this type have been inserted by the customer, and the total value for the inserted quantity. 5. Print ReceiptThe system prints a receipt with the number of items the customer has inserted of each type, together with the total value of the deposited items. A new line is printed for each type of returned item. Finally, the total return-value is retrieved and is printed by the receipt printer.6. End of Use CaseThe system prepares itself to receive the next customer by checking that there is sufficient room in deposit item bays and that the printer has enough paper.

Page 16: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 16

Sample Alternative Flows of Events

A1. Deposit Item Not ValidIf in 2. Determine Type, the system has determined a deposit item is invalid, the system returns the deposit item to the customer. The deposit item will not appear on the receipt.

A2. Printer Out of PaperIf in 6. End of Use Case, the system has determined that not enough paper is in the printer, an alarm will be activated.

Can you think of other alternatives?

Page 17: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 17

Purpose: Synchronize the project group’s ideas of the use case

Procedure: Work together with the users Sketch the outlines on large papers and display them Expect to rewrite the outlines several times to get a

stable set Describe each step in 1-3 sentences State clearly if steps can come in any order, or if they

are repeated Focus on the normal, regular, straight-forward way to do

the use case

Detailing the Basic Flow of Events

Page 18: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 18

Exercise: Ways to Write a Flow of Events

Read the different flow of events descriptions on the following three (3) slides and answer the following questions:

Who is the intended audience?

Which is the easiest to understand (read)?

Which do you think is the easiest to write?

Is any one “better” than the others?

Which one do you prefer? Why?

Page 19: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 19

Exercise: Flow of Events - Type IOrderers can create Orders to collect measurement data from the Network Elements.

The system will assign the Order a unique name and default values for when and how long the measurement should be and also how often it is to be repeated. These values can of course be edited by the Orderer.

The Orderer must further specify which measurement function, network element and measurements objects that are applicable. The Orderer can also add a personal comment to the order.

When necessary information is defined a new Order is created and initialized with the defined attributes, the name of the creator, date of creation, and status of the order will be set to 'scheduled'. (Possible values for the status are: Scheduled, Executing, Completed, Canceled, and Erroneous).

The user interface is then notified that a new Order has been created and receives a reference to the new Order so that it can be displayed.

Page 20: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 20

1. Start of use caseThis use case starts when the actor Operator indicates to the system to create a measurement order. The system will then retrieve all Network Element actors, their measurement objects and corresponding measurement functions that are available to this particular Operator. Available Network Elements are those that are in operation and the Operator has the authority to access. What measurement function is available depends on what has been setup for a particular type of measurement object.

2. Configure Measurement OrderThe system allows the Operator to select which Network Elements to measure. The system then shows the measurement objects available for a selected Network Element. The Operator selects measurement objects , and measurement functions for each object. The system allows the Operator to enter a textual comment on the measurement order. The Operator indicates to the system to complete the measurement order. The system will respond by generating a unique name for the measurement order and setting up default values for when, how often, and for how long the measurement should be made. The default values are unique to each Operator. The Operator edits the default values.

3. Initialize OrderThe Operator indicates to the system to initialize the measurement order. The system will then record the identity of the creating Operator, date of creation and that the measurement order now has the status “Scheduled”.

4. The Use Case EndsThe system confirms initialization of the measurement order to the Operator, and the measurement order is made available to other actors to view.

Exercise: Flow of Events - Type II

Page 21: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 21

Exercise: Flow of Events - Type III

=> 'Administrator order' (User identity)REPEAT

<='Show administrator order menu'IF (=> 'Creating an Order' (Measurement function,

network element, measurement object)) THENThe system finds a unique name, default values for when, how often and for how long the measurement should be executed.<= 'Show order' (Default attributes)REPEAT

=> 'Edit order' (Attribute to change, New value of attribute)<= 'Update screen' (New attributes)

UNTIL (All attributes are defined)REPEAT

IF (=> 'Edit order' (Attribute to change, New value of attribute)) THEN <= 'Update screen' (New attributes)ELSIF (=> 'Save order' (Order identity, Attributes)) THEN

The order is created and initialized in the system with the defined attributes, the name of the creator, date of creation and the status 'scheduled'.)

ENDIFUNTIL (=> 'Quit')

ENDIFUNTIL 'Quit administrator order'

Page 22: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 22

Exercise: Perspectives in Flow of Events

Now, read the different flow of events descriptions on the following two (2) slides and answer the following questions: Who is the intended audience?

Which is the easiest to understand (read)?

Which do you think is the easiest to write?

Is one “better” than the other?

Which one do you prefer? Why?

Page 23: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 23

Exercise: Outside Perspective

Flow of Events1. The use case starts when the subscriber lifts the

phone, and gets a dial tone.

2. The dial tone disappears when the subscriber dials the first digit.

3. The subscriber dials the rest of the number and will then hear a ring tone if the called party is not busy.

4. The ring tone will disappear if the called party answers the phone call.

5. The call continues until both parties hang up their phones.

6. If the called party is busy the subscriber will hear a busy tone and will then hang up the phone.

Local Call

Subscriber

Page 24: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 24

Exercise: Inside Perspective

Flow of Events

1. The use case is initiated when the subscriber lifts the phone and the system finds the correct subscriber object, marks it busy and gives a dial tone to the subscriber.

2. The system turns off the dial tone when the subscriber dials the first digit. The system loads the digit into a register and will then wait to receive and store the rest of the digits.

3. When the system has received enough digits it will start to analyze the received digits.

4. When the whole number has been analyzed the system will find the corresponding subscriber object and check whether or not it is marked busy.

5. If the called party is not busy the system will busy mark the object and start ...

Local CallSubscriber

Page 25: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 25

Who Reads the Flow of Events?

Customers: approve what system should do Users: understand what system should do Use-Case Specifier: document behavior Reviewers: examine the flow of events Designers: find design classes System Tester: use as basis for test cases Project Manager: manage the project Technical Writer: write user’s guide

Page 26: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 26

Flow of Events: Guidelines1.Don’t describe what happens outside the system2. Describe what data is exchanged between the actor and

the use case3. Do not describe the details of the user interface unless it

is an important requirement4. Describe the flow of events, not only the functionality. To

enforce this, start every action with “When the [actor] ... ”5. Describe only the events that belong to the use case --

not what happens in other use cases or outside of the system

6. Avoid vague terminology such as “for example”, “etc. ” and “information”

7. Detail the flow—all “what’s” should be answered

Page 27: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 27

Exercise: Detail the Basic Flow of Events

Describe each step in the basic flow of events for three (3) use cases in your project. Start with the step-by-step outlines written for your use

case model (in Unit 5) Further describe with 1 or 2 sentences per step Focus only on the normal “happy day” path through the

use case. No alternative flows, yet! Write neatly so that you can copy and distribute the text

to the rest of the group.

Page 28: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 28

Subflows: Structuring the Flow of Events Why divide a flow of events into subflows?

Keep the main flow short and easy to read Separate sequences that are only sometimes executed Separate sequences that can be executed at several

intervals in the same flow Clarify traceability to other project elements

Page 29: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 29

Use-Case Subflows as Separate Sections Basic flow of events

What normally happens Alternative flows of events

Use to specify

• Variants to the basic flow of events• Optional flows of events• Exceptions and errors

Occupies a large segment of the flow of events Flow of events can be 5-15 pages long,

depending on complexity of the use case

Page 30: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 30

Flow of Events: Guidelines for Structure Describe how the use case starts and ends Start by defining the basic flow of events

Structure the basic flow of events into steps Give each step a title

Describe all alternative subflows Describe the order of the subflows

Only describe order of subflows as fixed, if it is In other cases, point out that the order is unfixed

Page 31: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 31

Structuring of Alternative Flows

Use one section for each alternative flow

What to define for an alternative flow Where alternative flow starts The condition for this

alternative The behavior in the

alternative flow Where basic flow is resumed

Page 32: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 32

Specific Alternative Flows

Specific alternatives Occur at a specific step in another flow. Example:

A1: Bottle stuckThe customer inserts a bottle that falls over, is too big, or jams with another bottle. The sensors around the gate and the measuring gate detect this problem. The conveyer belt is stopped and an alarm is issued to call for the operator. The operator fixes the problem and the machine continues.

Page 33: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 33

Specific Alternative Flows The same flow may also be written with more

specific references. Example:

A1: Bottle stuckIn step 1. Start of Use Case in the basic flow, if a bottle gets stuck in the gate the sensors around the gate and the measuring gate will detect this problem. The conveyer belt is stopped and an alarm is issued to call for the operator. The operator fixes the problem and the machine continues in step 2. Determine Type in the basic flow.

Make a clear reference to Where you pick up the sequence of actions Where you hand it over to another flow

Page 34: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 34

General Alternative Flows

An alternative flow may pick up the sequence of actions anywhere: Example:

A2: Front panel is removed

If, at any point, somebody (probably the operator) removes the front panel of the machine, then the can compression is deactivated. It will not be possible to start the can compression with the front panel off. The removal will also activate an alarm to the operator. When the front panel is closed again, the machine will resume the operation.

Page 35: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 35

Example: Flow of Events

Basic Flow of Events1. Start of use case

This use case starts when ... What measurement function is available depends on what has been setup for a particular type of measurement object.

2. Configure Measurement OrderThe system allows the Operator to select …The system then allows the Operator to edit the default values.

3. Initialize OrderThe Operator indicates to the system that … the measurement order now has the status “Scheduled”.

4. The use case endsThe system confirms initialization of the measurement order to the Operator, and the measurement order is made available to other actors to view.

Alternative Flows of EventsA1. No Network Elements Available

If in “Start of use case”, it turns out that now Network Elements are available to measure for this Operator, the system will inform the Operator. The use case then ends.

A2. No Measurement Functions AvailableIf in “Configure Measurement Order” no measurement functions are available for the selected Network Elements, the system will inform the Operator about this and allow the Operator to select other Network elements.

A3. Cancel Measurement OrderThe system will allow the Operator to cancel all actions at any point during the use case. The system will then return to the state it had before the use case was started, then end the use case.

Page 36: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 36

Exercise: Detail the Alternative Flows Further detail at least three (3) alternative flows

for each use case in the previous exercise Continue the description of the flow of events of the use

cases in your class project Use the alternatives identified in the step-by-step

outlines written for your use cases (in Module 5) Describe clearly what will happen in each alternative Write neatly so that you can copy and distribute the text

to the rest of the group

Page 37: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 37

Using pre- and post-conditions Pre- and post-conditions are observable to the user Use only if needed for clarification

A pre-condition Constraint on when use case can start NOT the event that starts the use case

A post-condition Guaranteed true when use case ends Should apply regardless of

alternative flows May contain different variants

Use of Pre- and Post-Conditions

Page 38: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 38

Example of a Pre-Condition

Withdraw Cash

Pre-condition The customer has a personally-issued card that fits in the

card reader, has been issued a PIN number, and is registered with the banking system.

Use only if needed for clarification!

Page 39: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 39

Example of Post-Condition

Withdraw Cash

Post-condition At the end of the use case, all account and transaction

logs are balanced, communication with the banking system is reinitialized, and the customer has been returned his card or informed of where it will be sent.

Use only if needed for clarification!

Page 40: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 40

Describing a Use Case: Things to Remember

Use a simple language Use your glossary State what system does and what user does Number and name sections to simplify reviewing

Remember the description is for people to read, not for computers

Page 41: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 41

What about Non-Functional Requirements? The “URPS” of FURPS

Usability Reliability Performance Supportability

Compliance with Legal and Regulatory requirements FCC FDA DOD ISO

Design Constraints Operating systems Environments Compatibility Application standards

What are some others?

Where should they be specified?

Page 42: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 42

Specifying Non-Functional Requirements Some non-functional requirements apply to an

individual use case and may be captured within the properties of a use case1. Within the “Flow of Events” section of a use case

• Basic Flow• Alternate Flows

2. In the “Special Requirements” section of a use case Some non-functional requirements apply to the

whole system 3. These should be specified in the “Supplementary

Specifications”

TP: Supplementary Specifications Template

Page 43: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 43

The “URPS” of FURPS

Grady, 1992

Which of these might be

captured in the use-case model?

With which ones might this not be possible

or practical?

What should you do with

them?

Functionality Feature SetCapabilities

GeneralitySecurity

Usability Human FactorsAesthetics

ConsistencyDocumentation

Reliability Frequency/Severityof FailureRecoverability

PredictabilityAccuracyMTBF

Performance SpeedEfficiencyResource Usage

ThroughputResponse Time

Supportability TestabilityExtensibilityAdaptabilityMaintainabilityCompatibility

ConfigurabilityServiceabilityInstallabilityLocalizabilityRobustness

Page 44: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 44

Examples: Non-Functional Requirements

The Recycling Machine The machine can only handle one customer at a time. The machine has to be able to recognize deposit items

with a reliability of more than 95%.

What are some others?Where should each of these be specified?

Page 45: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 45

Specifying Usability Requirements Usability: The ease with which the software can

be learned and operated by the intended users How to specify:

Training time requirements, measurable task times Matches user abilities (unsophisticated/sophisticated) Comparison to other systems that users know and like On-line help systems, tool tips, documentation needs Conformity with standards

• Examples: Windows, style guides, GUI Standards

Page 46: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 46

Davis Workshop, 1993

Specifying Reliability Requirements Reliability: The ability for the software to behave

consistently in a user-acceptable manner Measures

Availability (xx.xx%) Accuracy Mean time between failures (xx hrs) Max. bugs per/KLOC (0-x) Bugs by class - critical, significant, minor

Predictors Lines of code Complexity metrics

Page 47: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 47

Davis Workshop, 1993

Specifying Performance Requirements Performance: A measure of speed and efficiency

of the running system Measures

Capacity Throughput Response time Memory Degradation modes

Also consider the degree to which implementation makes wise use of scarce resources (processor, memory, disk, network bandwidth, etc.)

Page 48: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 48

Davis Workshop, 1993

Specifying Supportability Requirements

Supportability: The ability of the software to be easily modified to accommodate enhancements and repairs

How to specify requirements Languages, DBMS, tools, etc. Programming standards Error handling and reporting standards

If not observable, state as intent or goals If not measurable or observable, it is not a requirement

Page 49: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 49

What About Design Constraints? A requirement should allow more than one design option

A design is a choice among options A requirement that leaves no options is a design constraint

Distinguish it from other requirements Place in a special section of your software requirements Identify the source of each Document the rationale for each

Page 50: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 50

WhatHow

WhatHow

WhatHow

Stakeholder Needs

Product or System Features

Software Requirements Specification (Use Cases)

Design Spec Test Procedures Documentation Plans

“One man’s

ceiling is

another man’s floor”

Davis, 1993

The What vs. How DilemmaQuestion: How can you tell a requirement from design?

Answer: It depends on your point of view.

Page 51: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 51

Exercise: Non-Functional Requirements

For your class project, list at least two non-functional requirements that would be documented in each of the following locations:1. In the Flow of Events of a use case

• Basic flow• Alternate flows

2. In the Special Requirements of a use case

3. In the Supplementary Specifications

Page 52: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 52

What About a “Traditional” SRS Approach?

Features

SoftwareRequirements

Vision Document

Vision Document

Needs

Use-Case ModelSupplementary Specifications

Supplementary Specifications

TraditionalSRS

TraditionalSRSUse-Case Model

Page 53: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 53

Software Requirements Specifications1. Introduction

1.1 Purpose1.2 Scope1.3 Definitions, Acronyms, and Abbreviations1.4 References1.5 Overview

2. Overall Description2.1 Product Perspective2.2 Product Functions2.3 User Characteristics2.4 Constraints2.5 Assumptions and Dependencies

3. Specific RequirementsAppendicesIndex

Software Requirements Specifications1. Introduction

1.1 Purpose1.2 Scope1.3 Definitions, Acronyms, and Abbreviations1.4 References1.5 Overview

2. Overall Description2.1 Product Perspective2.2 Product Functions2.3 User Characteristics2.4 Constraints2.5 Assumptions and Dependencies

3. Specific RequirementsAppendicesIndex

A “Traditional” SRS Template: Based on IEEE 830

TP: SRSTemplate

Page 54: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 54

IEEE 830 SRS: Chapter 3 - Specific Requirements

Feature System mode Type of user Objects Stimulus / Response Functional hierarchy

The answer is application dependent. The answer is application dependent. You may wish to organize by You may wish to organize by

Or even a combination of the above

adapted from IEEE 1993

How do I organize specific

requirements????

Page 55: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 55

IEEE 830 SRS Example: Organization by Feature

IEEE 1993

3. Specific Requirements3.1 External Interface Requirements3.1.1 User Interfaces3.1.2 Hardware Interfaces3.1.3 Software Interfaces3.1.4 Communications Interfaces

3.2 System Features3.2.1 Feature 13.2.1.1 Purpose3.2.1.2 Stimulus/Response Sequence3.2.1.3 Associated Functional Requirements

3.2.n Feature n3.3 Performance Requirements3.4 Design Constraints3.5 Software System Attributes3.6 Other Requirements

3. Specific Requirements3.1 External Interface Requirements3.1.1 User Interfaces3.1.2 Hardware Interfaces3.1.3 Software Interfaces3.1.4 Communications Interfaces

3.2 System Features3.2.1 Feature 13.2.1.1 Purpose3.2.1.2 Stimulus/Response Sequence3.2.1.3 Associated Functional Requirements

3.2.n Feature n3.3 Performance Requirements3.4 Design Constraints3.5 Software System Attributes3.6 Other Requirements

Could include

references to use cases here, if needed.

Page 56: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 56

Sample Software Requirements: Recycling MachineFEAT 1 The Recycling Machine will provide facilities to recycle bottles, cans, and crates.

SR 1 The Recycling Machine (system) shall accept 1 or more deposit items (cans, bottles, or crates) inserted during one deposit session.

SR 1.1 A deposit session shall begin when the first deposit item is inserted and shall end when the receipt is printed.

SR 1.2 The system shall read a bar code on the deposit item. The system shall validate the deposit item by comparing its code with a list of valid codes.

SR 1.2.1 If a deposit item is not valid, the system shall reject and return it.

SR 1.2.2 If a deposit item is valid, the system shall update the session total and the daily total for that deposit item type, and prepare itself to receive the next item.

Page 57: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 57

Sample Software Requirements (cont.)

SR 2 Upon receiving a press of the “print receipt” button on the control panel, the system shall print a receipt.

SR 2.1 The receipt shall have one line for each type of deposit item: the number of items of that type which were returned and the total value of those items.

SR 2.2 The bottom line of the receipt shall show the total return-value of all items deposited in one deposit session.

SR 3 The system shall end a deposit session by preparing to receive the next customer.

SR 3.1 The system shall check that there is sufficient room in deposit item bays and that the printer has enough paper.

SR 3.2 If room or paper is insufficient, the system shall shut down and shall issue an alarm on the operator communication channel.

Page 58: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 58

Software Requirements Specifications1. Introduction

1.1 Purpose1.2 Scope1.3 Definitions, Acronyms, and Abbreviations1.4 References1.5 Overview

2. Overall Description2.1 Use-Case Model Survey2.2 Assumptions and Dependencies

3. Specific Requirements3.1 Use Case Reports3.2 Supplementary Specifications

AppendicesIndex

Software Requirements Specifications1. Introduction

1.1 Purpose1.2 Scope1.3 Definitions, Acronyms, and Abbreviations1.4 References1.5 Overview

2. Overall Description2.1 Use-Case Model Survey2.2 Assumptions and Dependencies

3. Specific Requirements3.1 Use Case Reports3.2 Supplementary Specifications

AppendicesIndex

A “UC” SRS Template: Customized for Use Cases

TP: (UC) SRSTemplate

Page 59: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 59

Can We Combine The Two Approaches?

Features

SoftwareRequirements

Needs

Vision Document

Vision Document

TraditionalSRS

TraditionalSRS

WP2: Traceability Strategies

Use-Case Model

Page 60: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 60

Combining Use-Case Model and Traditional SRS

SRSSRSII

Illustrative Use Cases

SRSSRS

Traditional SRS(all requirements)

IIa

(examples of usage, plus architecturally significant use cases - for design verification)

Traditional SRS(all requirements)

+

SSSS

Supplementary Specifications

+I

Use-CaseModel

SRSSRS

Traditional SRS

Ia +Use-Case

Model

Need Traditional SRSWant Use Cases

Page 61: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 61

ref - IEEE 1993

Qualities of a Software Requirement Specification

Correct Complete Consistent Unambiguous Ranked for importance and stability Verifiable Modifiable Traceable Understandable

Page 62: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 62

Qualities of an SRS: CorrectA Requirements Specification is “correct” if: Every requirement within it is something required of the

system to be built For example, every requirement in the SRS contributes

to the satisfaction of some need

Hint: Involve people who have the problem or mission.

ref - Davis ‘93

Page 63: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 63

IEEE 1993

Qualities of an SRS: Complete A Requirement Specification is “complete” if it

contains: All significant requirements Responses of the software to all inputs Full labels and references

to all figures, tables, and diagrams Definitions of all terms

and units of measure (Glossary / Data Dictionary)

Page 64: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 64

A Requirements Specification is “consistent” if: No subset of individual requirements described in it

is in conflict.

Hint: Trace all related requirements

IEEE 1993

SR101: Pressing the on-button shall illuminate the power LED.

SR841: On system start-up, no observable results shall occur.

Qualities of an SRS: Consistent

SR245: The power LED shall be illuminated when the system is powered up.

(Inconsistent)(Consistent)

Page 65: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 65

ref - IEEE 1993

“A shall do B to C”

“A shall do B to C”

“A shall do B to C”

Req. 1

Qualities of an SRS: Unambiguous

A Requirements Specification is “unambiguous” if: Every requirement within it has only one

interpretation.

Page 66: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 66

Exercise: Exploring Ambiguity

Mary had a little lamb.In the space below, write (or draw) your detailed understanding of what this sentence means.

ref - Gause & Weinberg, 1989

Page 67: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 67

Exploring Ambiguity: Dictionary Definitionshad - past of havehave - 1a: to hold in possession as property 4a: to acquire or get possession of: OBTAIN (best to be had) c: ACCEPT; to have in marriage 5a: to be marked or characterized by (have red hair) 10a: to hold in a position of disadvantage or certain defeat b: TRICK, FOOL (been had by a partner) 12: BEGET, BEAR (have a baby) 13: to partake of (have dinner) 14: BRIBE, SUBORN (can be had for a price)lamb - 1a: a young sheep esp. less than one year old or without

permanent teeth b: the young of various other animals (as smaller antelopes) 2a: a person as gentle or weak as a lamb b: DEAR, PET c: a person easily cheated or deceived especially in trading

securities 3a: the flesh of lamb used as food

Page 68: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 68

Exploring Ambiguity: Analysis have lamb Interpretation1a 1a Mary owned a little sheep under one year of age or

without permanent teeth.4a 1a Mary acquired a little sheep under one year of age or

without permanent teeth.5a 1a Mary is the person who owned a little sheep under

one year of age or without permanent teeth.10a 1a Mary held a little sheep under one year of age or

without permanent teeth in a position of disadvantage.

10b 1a Mary tricked a little sheep under one year of age or without permanent teeth.

12 1b Mary gave birth to a young antelope.12 2a Mary is (or was) the mother of a particular small, gentle

person.13 3a Mary ate a little of the flesh of lamb.14 2c Mary bribed a small person trading in securities who

was easily cheated.

Page 69: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 69

Gause & Weinberg, 1989

What to Do About Language Ambiguity The Ambiguity Poll - create a measure that requires a

solid understanding of the problem to estimate. Memorization Heuristic - get various individuals to try to

recall the problem statement from memory. Parts that are not clear are likely the most ambiguous.

Key Word Technique - determine the key operational words in the statement and list their definitions. Mix and match to determine different interpretations. (Use these terms for glossary.)

Emphasis Technique - emphasize different words until as many interpretations as possible are discovered.

Other Techniques - use other techniques, pictures, graphics, formal methods -- that’s what use cases are for!

Page 70: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 70

Exploring Ambiguity: An Observation

Techniques that reduce ambiguity in an SRS often decrease understandability and alienate customers and users.

Our goal is to find the “sweet spot” where we attain the greatest understandability with the least ambiguity

Understandability

Ambiguity

The sweet spot

Page 71: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 71

Use natural language to describe the majority of the specification. Write as clearly and concisely as possible.

Use pictures, diagrams, dialogs, etc. to further illustrate the intent and features of the application

Augment with use cases and other formal techniques to fully define the functionality of the system.

Ambiguity vs. Understandability: What to Do?

Page 72: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 72

ref - IEEE 1993

Ranked by importance

SR103SR172SR192SR71SR63

SR172SR103SR63 SR71 SR192

Ranked by stability

Qualities of an SRS: Ability for Ranking A Requirements Specification is able to be

“ranked” for importance and stability if Each requirement in it has an identifier to indicate the

importance and stability of that particular requirement

Page 73: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 73

IEEE 1993

- The system supports up to 1,000 simultaneous users- The system shall respond to an arbitrary query in 500 msec.- The color shall be a pleasing shade of green- The system shall be user friendly- The system shall export view data in comma separated format

Qualities of an SRS: Verifiable A Requirements Specification is “verifiable” if:

Every requirement in it is verifiable. [… to a degree that convinces everybody!]

There exists some finite, cost-effective process with which a person or machine can check that the product meets the requirement.

Are these requirements verifiable?If not, what is a better way to state them?

(Involve QA folks to help decide.)

Page 74: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 74

IEEE 1993

Qualities of an SRS: Modifiable

A Requirements Specification is “modifiable” if: Its structure and style are such that any changes to

requirements can be made easily, completely, and consistently, while retaining the structure and style.

Features to facilitate this:

• Well organized• Table of contents• Index• Cross references• Minimum redundancy

Page 75: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 75

ref - IEEE 1993

Qualities of an SRS: Traceable A Requirements Specification is “traceable” if:

The origin of each of its requirements is clear and it facilitates the referencing of each requirement in future development

• Backward traceability (to previous stages of definition or development)

• Forward traceability (to all documents spawned by the SRS)

Hint: Make sure every requirement is referenceable

• Use unique numbers

• Use labels

• Use “shall" or other unique identifiers

• Use a requirements repository to maintain traceability

Page 76: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 76

Qualities of an SRS: Understandable

A Requirements Specification is “understandable” if: Both the user and supplier communities are able to fully

comprehend the requirements stated in it Hints:

Early document should focus on general description and features of the system

Requirements writers must understand both audiences Use cases can help with understanding the system’s

functional requirements and boundaries

Page 77: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 77

Find what

R eplace w ith

R eplace

Start C ancel

How to Describe User Interfaces

Enclose sketches of proposed screen appearance with the use-case descriptions

Be careful not to specify too much of the design in the use-case documents

Page 78: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 78

Shurtleff ‘94

Storyboarding

Movies, cartoons, and animated features all begin with storyboards that tell Who the players are (actors) What happens to them How it happens

Page 79: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 79

Shurtleff ‘94

Storyboarding: Benefits

Help gather and refine customer requirements in a user friendly way

Encourage more creative and innovative design solutions

Encourage team review and prevent features no one wants

Ensure that features are implemented in an accessible and intuitive way

Ease the interviewing process Avoid the blank-page syndrome

Page 80: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 80

An early demonstration of some or all of the externally observable behaviors of a system

Used to Gain feedback on proposed solution Demo the problem domain Validate known requirements Discover unknown requirements

Prototyping tools Demo programs Simulations

Prototyping

Page 81: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 81

Davis ‘95

Prototyping: Types Throwaway

Serves solely to demonstrate that the technological or user interface risks of the proposed solution are feasible

Throw away - everything except knowledge gained Evolutionary

Demonstrates viability of technology approach employed and user interface

Throw away - as much as necessary, saving knowledge gained and core technologies applied

Operational prototype Final form, function, and fit, as well as technology Throw away - as little as possible

Page 82: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 82

Prototyping: Selecting Type to Use For what purpose?

To elicit and understand requirements? To prove and understand technology? Both of the above?

Benefits of prototyping Reduce risk Enhance shared understanding Improve cost and schedule estimates Improve feature definition

• Often, important features are found to be of little value - and vice versa

Page 83: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 83

How to Describe Communication Protocols

Specify a communication protocol if the actor is another system or external hardware The description of the use case should state if some

existing protocol is to be used If the protocol is new, it will be fully described during

object-model development

Page 84: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 84

Adapted from Alan Davis

What Is Not in an SRS?

Design - How to accomplish the requirements Use the Design Model to specify sub-components of a

system and/or their interfaces with other sub-components

Verification - How you’ll know the requirements have been met

Use the Test Model to specify test cases and test procedures

Project Data - When the requirements will be met Use the Software Development Plan to specify

schedules, verification and validation plans, and configuration management plans

Page 85: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 85

RUP Workflow Detail: Refine the System Definition

Page 86: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 86

RUP Workflow Detail: Refining the System Definition

Page 87: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 87

Review: Refining the System Definition

1. What is in a software requirement specification? What are its roles?

2. What properties of a use case are documented in the Use-Case Report?

3. What is the purpose of the flow of events in a use case? Who is it written for? What does the basic flow describe? What different types of alternative flows may be identified?

4. What are pre- and post-conditions? When should they be used?

5. What is the purpose of the “Special Requirements” of a use case?

(Continued )

Page 88: Refining The System Definition

Rational Requirements Management with Use Cases v5.5Copyright © 1998-2000 Rational Software, all rights reserved 88

Review: Refining the System Definition6. What are the types of non-functional requirements that

should be tracked in your projects? Which of these can be captured in use cases? Where should

they each be specified?

7. Is your industry bound by legal or regulatory requirements? If so, what types of specifications should be written to assure

compliance?

8. What is a design constraint? Where is it documented?9. List some quality measures of a requirement

specification.10. What is not included in an SRS?