需求-用例增量
增量1:支票和储蓄账户的存款和取款
增量2:查询和转账
增量3:透支
每个增量内进行迭代:乐观的,正常的,悲观的
需求用例规约:名称,触发器,输入参数,输出返回值,出现的前置条件/异常,出现的(raised)后置条件/异常,基本的/乐观场景,替代性可选的/悲观的场景,业务规则,测试实例。
WithdrawFromCheckingAccount用例的用例规约
用例名:WithdrawFromCheckingAccount
触发器: WithdrawFromCheckingAccount
输入参数: sAcctNum, nWithdraw
输出返回值: sText
前置条件: ValidAccount = true and nWithdraw <=
nCurrentBalance
出现的前置条件异常: 待定的
描述/转换: nCurrentBalance = nCurrentBalance - nWithdraw
后置条件: nCurrentBalance < nOldBalance
后置条件异常:无
相关用例: Generalization, Includes, Extends/Extension Point:
无
基本场景/乐观场景: Text(文本) - 待定;Diagram(图)
-见 WithdrawFromCheckingAccount乐观场景顺序图
替代性可选场景/被动场景:Text -待定;Diagram -见WithdrawFromCheckingAccount
活动图
业务规则: ValidAccountRule, AdequateBalanceRule
测试实例:1 - 乐观的:输入: sAcctNum - BGates001,
nWithdraw - 100, nCurrentBalance - 1000 Conditions: None,
输出:"BGates001 withdraw $100 OK and recorded";2 ...待定
输入/输出表单:
WithdrawFromCheckingAccount用例的输入/输出表单
Withdraw Request Form(取款需求表单)
Customer Account Number(客户账号)__________
Withdraw Amount(取款数量) ________
Button-Submit(提交按钮) Button-Clear(清除按钮)
Withdraw Response Form(取款响应窗体)
Customer Account Number __________
Withdraw Amount __________
Status (状态) ________________________
Button-OK(OK 按钮)
需求-顺序图WithdrawFromCheckingAccount - 乐观场景
注:getApp的第一笔事务需要达到应用程序的最高级别
Rose 顺序图:在浏览器窗口,选择Use Case View;选择
Use Case Diagram;选择一个用例;选择Browse-Interaction
Diagram-Use Case View-
;选择Sequence Diagram;键入图名,例如WithdrawFromCheckingAccount-OptiminticScenario;在图上放置对象以表示参与者;双击每个对象,然后从下拉列表中选择参与者名;
在图的中央放置一个对象以表示系统;双击对象,从下拉列表中键入系统名;选择Rose
Object Link (对象连接符),在参与者和系统之间拖曳;选择Tools-Check
Model;选择File-Save .
4-WithdrawFromCheckingAccount用例-所有场景的需求活动图
注:getApp的第一笔事务需要达到应用程序的最高级别
上一页 下一页
|
|