Use Cases - University Of Washington

2y ago
27 Views
2 Downloads
1.17 MB
41 Pages
Last View : 16d ago
Last Download : 2m ago
Upload by : Aarya Seiber
Transcription

CSE 403: Software Engineering, Spring Use CasesEmina Torlakemina@cs.washington.edu

Outline What is a use case? Terminology Styles of use cases Steps for creating a use case2

What is a use case?A written description of the user'sinteraction with the software product toaccomplish a goal. It is an example behavior of the system. 3-9 clearly written steps lead to a “mainsuccess scenario.”Written from actor's point of view, notthe system’s. 3

What is a use case?A written description of the user'sinteraction with the software product toaccomplish a goal. It is an example behavior of the system. 3-9 clearly written steps lead to a “mainsuccess scenario.”Written from actor's point of view, notthe system’s. Use cases capturefunctional requirementsof a system.3

Benefits of use cases Establish an understanding between thecustomer and the system developers of therequirements (success scenarios) Alert developers of problematic situations,error cases to test (extension scenarios) Capture a level of functionality to plan around(list of goals)4

Qualities of a good use case5

Qualities of a good use case Focuses on interaction Starts with a request from an actor to the system. Ends with the production of all the answers to the request.5

Qualities of a good use case Focuses on interaction Starts with a request from an actor to the system. Ends with the production of all the answers to the request. Focuses on essential behaviors, from the actor’s point of view Does not describe internal system activities. Does not describe the GUI in detail.5

Qualities of a good use case Focuses on interaction Starts with a request from an actor to the system. Ends with the production of all the answers to the request. Focuses on essential behaviors, from the actor’s point of view Does not describe internal system activities. Does not describe the GUI in detail. Concise, clear, accessible to non-programmers Easy to read. Summary fits on a page. Main success scenario and extensions.5

Use cases versus internal featuresConsider thesoftware torun a mobilephone 6

Use cases versus internal featuresUse cases call someonereceive a callsend a messagememorize a numberConsider thesoftware torun a mobilephone Point of view: user6

Use cases versus internal featuresUse cases call someonereceive a callsend a messagememorize a numberPoint of view: userInternal functionsConsider thesoftware torun a mobilephone transmit / receive dataenergy (battery)user I/O (display)phone-book mgmt.Point of view: developer6

Use cases and requirements Special deals may not run longer than 6 months. Customers only become preferred after 1 year. A customer has one and only one sales contact. Database response time is less than 2 seconds. Web site uptime requirement is 99.8%.Which of theserequirements should berepresented directly ina use case? Number of simultaneous users will be 200 max.7

Use cases and requirements Special deals may not run longer than 6 months. Customers only become preferred after 1 year. A customer has one and only one sales contact. Database response time is less than 2 seconds. Web site uptime requirement is 99.8%.Which of theserequirements should berepresented directly ina use case? Number of simultaneous users will be 200 max.None! These are propertiesbut not user-driven behaviorsof the system, so the usecases wouldn't mention them.7

Terminology8

Terminology Actor: an entity that acts on the system Person, external hardware (like a timer), or another system.8

Terminology Actor: an entity that acts on the system Person, external hardware (like a timer), or another system. Primary actor: initiates interaction to accomplish a goal8

Terminology Actor: an entity that acts on the system Person, external hardware (like a timer), or another system. Primary actor: initiates interaction to accomplish a goal Goal: desired outcome of the primary actor8

Terminology Actor: an entity that acts on the system Person, external hardware (like a timer), or another system. Primary actor: initiates interaction to accomplish a goal Goal: desired outcome of the primary actor Level User goals (accomplished in one sitting) Summary goals (accomplished in multiple sittings) Subfunction goals (required to carry out user goals)8

Terminology Actor: an entity that acts on the system Person, external hardware (like a timer), or another system. Primary actor: initiates interaction to accomplish a goal Goal: desired outcome of the primary actor Level User goals (accomplished in one sitting) Summary goals (accomplished in multiple sittings) Subfunction goals (required to carry out user goals)Use cases are always initiated by actors and describethe flow of events that these actors are involved in.8

Styles of use casesUse case diagram in UML, the Unified Modeling LanguageInformal use case a short paragraphFormal use case a multi-part structured description9

Use case diagramThe overall list of the system's use cases can be drawnas high-level diagrams, with: actors as stick-men, with their names (nouns) use cases as ellipses, with their names (verbs) line associations, connecting an actor to a use case inwhich that actor participates use cases can be connected to other cases that theyuse / rely onCheck out bookLibrary patron10

Actor-goal lists: function content of the systemActorGoalLibrary PatronSearch for a bookCheck out a bookReturn a bookLibrarianSearch for a bookCheck availabilityIt can be useful tocreate a list or table ofprimary actors andtheir "goals" (use casesthey start). Thediagram will thencapture this material.Request a book from another library11

Use case summary diagramsLibrary SystemCheck outSearchLibrarianReturnLibraryPatronCheck avail.Request12

Use case summary diagrams13

What is an extension?14

What is an extension? A possible branch in a use case scenario, often triggered by anerror or failure in the process. Useful for finding edge cases that need to be handled and tested.14

What is an extension? A possible branch in a use case scenario, often triggered by anerror or failure in the process. Useful for finding edge cases that need to be handled and tested. Do Think about how every step of the use case could fail. Give a plausible response to each extension from the system. Response should either jump to another step of the case, or end it.14

What is an extension? A possible branch in a use case scenario, often triggered by anerror or failure in the process. Useful for finding edge cases that need to be handled and tested. Do Think about how every step of the use case could fail. Give a plausible response to each extension from the system. Response should either jump to another step of the case, or end it. Don’t List things outside the use case ("User's power goes out"). Make unreasonable assumptions ("DB will never fail"). List a remedy that your system can't actually implement.14

Informal use casePatron loses a book The library patron reports to the librarianthat she has lost a book. The librarianprints out the library record and askspatron to speak with the head librarian,who will arrange for the patron to pay afee. The system will be updated to reflectlost book, and patron's record is updatedas well. The head librarian may authorizepurchase of a replacement book.Informal use case iswritten as a paragraphdescribing thescenario / interaction.15

Informal use case with structured textI I.A I.A.ii I.A.ii.3 I.A.ii.3.qYou will probably usesomething in this generalstyle.Although not ideal, it is almost always betterthan unstructured natural language.16

Formal use caseGoalPatron wishes to reserve a book using the online catalogPrimary actorPatronScopeLibrary systemLevelUserPreconditionPatron is at the login screenBook is reservedSuccess endconditionFailure end condition Book is not reservedTriggerPatron logs into systemParts that make up a formal use case(continued on the next slide).17

Formal use case (continued)Main successscenario1.2.3.4.5.6.7.Extensions (errorscenarios)2a. Password is incorrect2a.1 System returns patron to login screen2a.2 Patron backs out or tries again5a. System cannot find book5a.1 Variations(alternativescenarios)4. Patron enters author or subjectPatron enters account and passwordSystem verifies and logs patron inSystem presents catalog with search screenPatron enters book titleSystem finds match and presents location choicesPatron selects location and reserves bookSystem confirms reservation and re-presents catalog18

What notation is good?There are standard templates for requirementsdocuments, diagrams, etc. with specific rules. Is this agood thing? Should we use these standards or makeup our own? Standards are helpful as a template or starting point. But don't be a slave to formal rules or use a model/scheme that doesn't fit your project's needs.19

Steps for creating a use case1. Identify actors and goals2. Write the main success scenario3. List the failure extensions4. List the variationsAlistair Cockburn20

1. Identify actors and goals What computers, subsystems and people will drive our system? (actors) What does each actor need our system to do? (goals) Exercise: actors/goals for your projectsCome up with 4 use case names for your software,draw a UML use case summary diagram for it, andwrite out one complete (formal) use case.21

2. Write the main success scenario Main success scenario is the preferred "happy path” easiest to read and understand everything else is a complication on this Capture each actor's intent and responsibility, fromtrigger to goal delivery say what information passes between them number each line22

3. List the failure extensions Usually, almost every step can fail (bad credit, out of stock) Note the failure condition separately, after the main success scenario Describe failure-handling recoverable: back to main course (low stock reduce quantity) non-recoverable: fails (out of stock, or not a valued customer) each scenario goes from trigger to completion Label with step number and letter: 5a failure condition 5a.1 use case continued with failure scenario 5a.2 continuedExercise: describe one failureextension for your project’s usecase.23

4. List the variations Many steps can have alternative behaviors or scenarios Label with step number and alternative 5’. Alternative 1 for step 5 5’’. Alternative 2 for step 524

Pulling it all together: how much is enough?You have to find a balance comprehensible vs. detailed graphics vs. explicit wording and tables short and timely vs. complete and lateYour balance may differ with each customerdepending on your relationship and flexibility25

Summary Uses case describe example system behaviors(contracts) from the user’s point of view. Can be diagrams, informal paragraphs, formaluse cases. 4 steps to create use cases.26

Use case diagram 10 The overall list of the system's use cases can be drawn as high-level diagrams, with: actors as stick-men, with their names (nouns) use cases as ellipses, with their names (verbs) line associations, connecting an actor to a use case in which that actor par

Related Documents:

Retail. Big data use cases 4-8. Healthcare . Big data use cases 9-12. Oil and gas. Big data use cases 13-15. Telecommunications . Big data use cases 16-18. Financial services. Big data use cases 19-22. 3 Top Big Data Analytics use cases. Manufacturing Manufacturing. The digital revolution has transformed the manufacturing industry. Manufacturers

CONTROL PROGRAM & MOSQUITO PREVENTION Allison Bray, M.S. Environmental Health Specialist, . WNV IN SAN DIEGO Human Cases (fatal) 2019: 3 cases (0) 2018: 2 cases (0) 2017: 2 cases (0) 2016: 22 cases (2) 2015: 44 cases (6) WNV IN CALIFORNIA Human Cases (fatal) 2019: 225 cases (6)

PELICAN CASE 3-4 Anatomy of a Pelican Case 5-8 Memory Card Cases/Micro Cases 9-10 Small Cases 11-14 Medium Cases 15-20 Digital Protection Cases 21-26 Large Cases 27-28 Long Cases 29-30 Pelican Organization Solutions 31-33 Pelican Case Specifications 34 Pelican Case Accessories PELICAN STORM CASE 35-36 Anatomy of a Pelican Storm Case 37 .

Read Case in Point Make a case journal Read practice cases in other books (40 cases) University of Michigan On-line practice CQI, Case Chase Clips (morning of interview) McKinsey, Bain and BCG website Practice live cases (30 live cases) Form groups, alumni, career services, and Evisors.com

5. George Washington is honored on Valentine's Day. YES NO 6. Washington State is on the East Coast of the U.S. YES NO 7. George Washington's birthday is in January. YES NO 8. George Washington's face is on the 5 bill. YES NO 9. George Washington was a general in the Vietnam War. YES NO 10. George Washington was an important movie star .

Line 1a. Active Cases Report the number of cases that were active and awaiting disposition at the beginning of the month. "Active cases" are those cases that the court has control over and are awaiting disposition. Line 1b. Inactive Cases Report the number of cases at the beginning of the month that had been classified as inactive.

Execute Test Cases. Understand the Test Cases Spreadsheet To filter and execute Test Cases, you must first understand the Test Cases spreadsheet. Test Cases, provided in Excel format, contain four main sections: 1. Test Case Information 2. atient Information P 3. Immunization History 4. Forecast Each row represents a single Test Case. 1 .

Information on the CCI website reveals that as on March 20151, there were approximately 590 cases pending before CCI and about 8.5% of these cases were cases transferred from the MRTP Commission. Approximately 83.1% of the cases were cases where someone approached the CCI and in approximately 4.6% of the cases, CCI has taken suo moto cognizance.