设计模式第三堂课

本文深入探讨了用例设计的全过程,从标识用例、分析用例边界到扩展用例,涵盖了用例的优先级、复杂度以及关键步骤。通过实例展示了如何详细分解用例,确保覆盖所有可能的分支步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.标识用例

Index

Name

Actor

Relationship

Priority

Complexity

UC1

Login

P/MM/SM/S/D

Extend(UC2,UC1)

Middle

Small/1-1.5pw

UC2

Register

P/MM/S/D

 

 

 

……

 

 

 

 

 

UCi

Order meal

P

Extend(  ,   )

Include(  ,   )

High

 

 

PS:

1.    relationship:extend(子用例,基用例)、include(基用例、子用例)

2.    priority:(1)数字标识:1(高)、2……

        (2)high、middle、low

3.   complexity: 工作量/…人周(人月)  eg. large/2-2.5pw

 

2.    High Level UC (高级用例分析)—标识用例边界

TUCBW—用例起始边界

TUCEW—用例结束边界

 

eg. Login

TUCBW: Patron clicks “login” button on mainpage

TUCEW: Patron receives login result messageon main page

 

Index

Name

Actor

TUCBW

TUCEW

UC1

Login

P

Patron clicks “login” button on main page

Patron receives login result message on main page

 

 

 

 

 

 

 

3.    Extended Level UC (扩展用例分析)

UC1 Login

Name

Login

Context

The user input some information to login the COS

Actor

P\CS\MM\MD\SM

Basic Steps:

1. P clicks login button on main page

2. Cos show “login” dialog with Tel.no ,verified code and password input fields, also “get verified code” ,”login” ,and “cancel” button  

3. P inputs Tel.no , clicks “get verified code” button

4. COS sends cod user

5. User get verified code and filled it into field, then input password click login button

6. COS validates the data and shows the result

7. P receives login result message on main page

Alternative Steps:

4.1 IF COS verified Tel.no success

4.1.1 sends the verified code to user

4.2 ELSE

4.2.1 COS shows failure message to user

4.2.2 P saw the message choose to correct it or register

 

PS:

1.    Basic Steps:列出正常步骤(即假设输入的都是有效数据)

2.    Alternative Steps:列出分支步骤(异常情况)

 

扩展用例表

UC1 Login

Actor

System

 

0.COS system display front page

1.TUCBW: P clicks login button on main page

2. COS shows ‘login’ dialog with Tel.no ,verified code and password input fields, also ‘get verified code’ ,’login’ ,and ‘cancel ’ button

3. P inputs Tel.no , clicks ‘get verified code’ button

4. COS sends cod user

5. User get verified code and filled it into field, then input password click login button

6. COS validates the data and shows the result

7. TUCEW: P receives login result message on main page

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值