Understanding Requirements Use Cases Requirements In Context Importance

  • Slides: 24
Download presentation
Understanding Requirements Use Cases: Requirements In Context

Understanding Requirements Use Cases: Requirements In Context

Importance of Requirements Analysis v Challenged projects : projects that did not materialize or

Importance of Requirements Analysis v Challenged projects : projects that did not materialize or were not completed on time v 37% of the problems with such projects were related to requirements: – 13% - poor user input – 12% - incomplete requirements – 12% - changing requirements

Types of Requirements FURPS+ v Functional - features, capabilities, security v Usability - human

Types of Requirements FURPS+ v Functional - features, capabilities, security v Usability - human factors, help, documentation v Reliability - frequency of failure, recoverability, predictability v Performance - response times, throughput, accuracy, availability, resource usage v Supportability - adaptability, maintainability, configurability

The + in FURPS+ v Implementation - resource limitations, language and tools, hardware, etc.

The + in FURPS+ v Implementation - resource limitations, language and tools, hardware, etc. v Interface - constraints imposed by interfacing with external systems v Operations - system management in its operational setting v Packaging v Legal - licensing and so forth

What artifacts may start in inception? v Vision and business case – Describes high-level

What artifacts may start in inception? v Vision and business case – Describes high-level goals and constraints. v Use Case model – Describes a set of typical scenarios encountered in using a system. Ø Consists mainly of behaviors (functional requirements). v Supplementary specification – Describes other requirements not in use cases Ø Consists mainly of non-functional requirements v Glossary – Key domain terminology Ø Data dictionary. Records requirements relating to data, such as validation rules, acceptable values, etc; Ø can detail any element, e. g. object attribute, parameters, report layout, etc; v Risk list and Risk Management Plan – Describes business, technical, resource and schedule risks and ideas for their mitigation or response.

What artifacts may start in inception? v Prototypes and proof-of-concepts v Iteration plan –

What artifacts may start in inception? v Prototypes and proof-of-concepts v Iteration plan – Describes what to do in the first elaboration iteration v Phase Plan & Software development Plan – Guess for elaboration phase duration. Tools, people, education and other resources. v Development Case – Description of the customized UP steps and artifacts for this project. v Artifacts will be partially completed in this phase and will be refined in later iterations.

The Use-Case Model v defined within the requirements discipline v it is the set

The Use-Case Model v defined within the requirements discipline v it is the set of all use cases v a model of the system’s functionality and environment v help keep the system goals and requirements clear to all v easier – especially for end-users – contribute meaningfully.

Use Cases v v v v reflect the goals of the customers and end

Use Cases v v v v reflect the goals of the customers and end users records the story of achieving the goal different levels of use cases concentrate on the goal oriented use case discover the actors scenarios - use case instance set of use case instances where each is a sequence of actions a system performs that yields an observable result of value to a particular actor set of use case instances of related success and failure scenarios that describe actors using a system to support a goal.

Use Cases as Requirements v Use cases are requirements – primarily functional – central

Use Cases as Requirements v Use cases are requirements – primarily functional – central mechanism for requirement discovery – not all the requirements are described this way – they are text documents not diagrams v UML diagrams describes the use cases, actors and their relationships v Specify what the system does not how it does it

Goals and Scope of a Use Case v At what level and scope should

Goals and Scope of a Use Case v At what level and scope should use cases be expressed? v A: Focus on uses cases at the level of elementary business process (EBP). v EBP: a task performed by one person in one place at one time which adds measurable business value and leaves the data in a consistent state. – Approve credit order - OK. – Negotiate a supplier contract - not OK. v It is usually useful to create separate “sub” use cases representing subtasks within a base use case. – e. g. Paying by credit

Use Cases and Goals v an EBP-level use case is a user-goal use case

Use Cases and Goals v an EBP-level use case is a user-goal use case v To find use cases at this level: – find the user goals – define a use case for each goal v Don’t ask: "How will the system be used? " ask "What are the goals of the users? " – "Login" is not a user goal - therefore not an EBP- level use case. Ø Ø Place a refill order is a goal Fill out a feedback form is a goal

Use cases and adding value v Actor: something with behavior, such as a person,

Use cases and adding value v Actor: something with behavior, such as a person, computer system, or organization, e. g. a cashier. v Scenario: specific sequence of actions and interactions between actors and the system under discussion, e. g. the scenario of successfully purchasing items with cash. v Use case: a collection of related success and failure scenarios that describe actors using a system to support a goal.

Use cases and adding value Handle returns Main success scenario: A customer arrives at

Use cases and adding value Handle returns Main success scenario: A customer arrives at a checkout with items to return. The cashier uses the POS system to record each returned item… Alternate scenarios: If the credit authorization is reject, inform customer and ask for an alternative payment method. If item identifier not found in the system, notify the Cashier and suggest manual entry of the identifier code. …

Use case types and formats v Black-box use cases describe system responsibilities, i. e.

Use case types and formats v Black-box use cases describe system responsibilities, i. e. define what the system must do. v Uses cases may be written in three formality types – Brief: one-paragraph summary, usually of the main success scenario. – Casual: Informal paragraph format (e. g. Handle returns) – Fully dressed: elaborate. All steps and variations are written in detail.

Primary Actors, Goals and Use Cases v Use Cases are define to satisfy the

Primary Actors, Goals and Use Cases v Use Cases are define to satisfy the goals of the primary actors - the principal actor that calls upon the system to fulfill a goal v The basic procedure is: – choose the system boundary – identify the primary actors – identify their goals at the highest EBP level – define the use cases that satisfy the user goals

Choosing the System Boundary v Defining the boundary of the system can be done

Choosing the System Boundary v Defining the boundary of the system can be done by defining what is outside the system

Finding Primary Actors and Goals v Primary vs. supporting actors v Brainstorming v goals

Finding Primary Actors and Goals v Primary vs. supporting actors v Brainstorming v goals reveal actors; actors reveal goals v Some questions to ask: – – – Who starts and stops the system? Who does user and security management? Who does system administration? Who evaluates system performance? logs? How are software updates to be handled? Pull or push? Is time an actor?

Actor - Goal List Customer add request delete request change request list prescriptions Administrator

Actor - Goal List Customer add request delete request change request list prescriptions Administrator add user delete user modify user manage security analyze prescription data Prescription Activity System Manager start up system shut down system

Events, Actors, Goals External Event From Actor Goal Achieved enter sale line item cashier

Events, Actors, Goals External Event From Actor Goal Achieved enter sale line item cashier process a sale enter payment cashier or customer process a sale

Actors Primary actor - has user goals fulfilled through using services to the system

Actors Primary actor - has user goals fulfilled through using services to the system under development (Su. D) – Why identify - to find user goals Ø cashier in a POS Ø customer of Pharmacy v Supporting Actor - provides a service to the Su. D – Why identify - to clarify external interface v Offstage Actor - has an interest in the Su. D - a gov't tax agency v – Why identify - to ensure that all necessary interests are identified

Fully-dressed example: Process Sale Use case UC 1: Process Sale Primary Actor: Cashier Stakeholders

Fully-dressed example: Process Sale Use case UC 1: Process Sale Primary Actor: Cashier Stakeholders and Interests: -Cashier: Wants accurate and fast entry, no payment errors, … -Salesperson: Wants sales commissions updated. … Preconditions: Cashier is identified and authenticated. Success Guarantee (Postconditions): -Sale is saved. Tax correctly calculated. … Main success scenario (or basic flow): [see next slide] Extensions (or alternative flows): [see next slide] Special requirements: Touch screen UI, … Technology and Data Variations List: -Identifier entered by bar code scanner, … Open issues: What are the tax law variations? …

Fully dressed example: Process Sale (cont. ) Main success scenario (or basic flow): The

Fully dressed example: Process Sale (cont. ) Main success scenario (or basic flow): The Customer arrives at a POS checkout with items to purchase. The cashier records the identifier for each item. If there is more than one of the same item, the Cashier can enter the quantity as well. The system determines the item price and adds the item information to the running sales transaction. The description and the price of the current item are presented. On completion of item entry, the Cashier indicates to the POS system that item entry is complete. The System calculates and presents the sale total. The Cashier tells the customer the total. The Customer gives a cash payment (“cash tendered”) possibly greater than the sale total. Extensions (or alternative flows): If invalid identifier entered. Indicate error. If customer didn’t have enough cash, cancel sales transaction.

Essential vs. Concrete style v Essential: Focus is on intend. – Avoid making UI

Essential vs. Concrete style v Essential: Focus is on intend. – Avoid making UI decisions v Concrete: UI decisions are embedded in the use case text. – e. g. “Admin enters ID and password in the dialog box (see picture X)” – Concrete style not suitable during early requirements analysis work.

Use Case Diagrams Primary actors to the left: have user goals. Next. Gen Supporting

Use Case Diagrams Primary actors to the left: have user goals. Next. Gen Supporting actors to the right: they provide a service. Process Sale Cashier Handle returns Process Rental Alternative notation for computer system actor Payment Authorization Service <<actor>> Tax Calculator