一个用例可以包含和前置相同的其他用例吗? [英] Can a use-case include and precondition the same other use-case?

查看:45
本文介绍了一个用例可以包含和前置相同的其他用例吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们以登录和添加项目为例,作为项目管理系统的两个用例.客户的要求是:(他需要/想要:)

Let's take the example of logging in and add item as two use case of an items management system. the requirements of the client are : (he needs/wants to : )

  1. 获得对系统资源的合法访问权
  2. 添加项目(创建一个).

我们也知道未经身份验证的用户不应使用该系统!

we also know that no unauthenticated user should use the system !

我的问题是:

1) 获得访问权限"是一个用例吗?其他用例的先决条件 ?或两者 ?(知道通过将用例命名为Gain Access"而不是Logging in",我想强调需要而不是解决方案满足这种需求.

1) Is "Gain Access" a use case ? A precondition to other use-cases ? Or Both ? (knowing that by naming the use-case "Gain Access" and not "Logging in" I wanted to highlight the need rather than the solution to that need.

2) 如果Gain Access"是一个用例,那么Add Item"用例是否包括获得访问权限"用例?

2) if "Gain Access" is a use-case, does the "Add Item" use-case includes the "Gain Access" use-case ?

用例依赖关系:

顺序依赖

  • 用例前置条件反映了用例之间的顺序依赖关系.

  • A use case precondition reflects a sequential dependency between use cases.

带有前置条件 C 的用例 B 只能在 用例 A 产生 C 作为后置条件后启动.用例 A 之后执行用例 B;它们的连接是异步的.

Use case B with precondition C can only start after use case A has produced C as a post-condition. Use case B is executed after use case A; their connection is asynchronous.

函数依赖

  • 相比之下,包含关系反映了用例之间的功能依赖关系.

  • In contrast, an include relationship reflects a functional dependency between use cases.

当用例 A 与用例 B 存在包含关系时,这意味着用例 B 的功能是用例 A 整体功能的一部分.用例 B 作为用例 A 的部分执行;它们的连接是同步的.

When use case A has an include relationship to use case B, it means that the functionality of use case B is part of the overall functionality of use case A. Use case B is executed as part of use case A; their connection is synchronous.

https://www.batimes.com/articles/use-case-preconditions-a-best-kept-secret.html

推荐答案

用例必须产生商业价值.登录"(或获得访问权限等)本身是否提供了商业价值?系统的用户会 login 然后离开吗?可能不是.因此登录本身不是用例.它可以记录为用例中的一个步骤(如果您对解决方案有足够的了解并且愿意说的话),但请注意不要在用例中指定技术解决方案.您最好指定必须将用户标识为某种级别的身份验证并将其作为先决条件等应用.

A Use Case has to generate business value. Is "login" (or gain access etc.) delivering business value in and of itself? Would the user of the system login and then leave it at that? Probably not. Therefore login is not a Use Case itself. It could be documented as a step in a Use Case (if you know enough about the solution and are feeling inclined to say) but be careful not to specify technology solutions in Use Cases. You'd be better to specify that the User must be identified to a certain level of authentication and apply that as a pre-requisite etc.

商业价值是关键.识别商业价值是分析艺术和科学的一部分.例如,如果您不使用用例来建模需求,情况也是如此——例如作为(角色)需要(行动)以便(业务价值)"形式的用户故事再次以业务价值为重点.归根结底,业务价值是任何功能需求的重点,明确识别它应该是您的分析接近其目标的主要指标之一.

Business value is the key. Recognising business value is part of the art and science of analysis. For example, the same would be true if you were not using Use Cases to model requirements -- e.g. a User Story of the form "As a (role) in need to (action) so that (business value)" is again business-value focused. Ultimately, business value is the focus of any functional requirement and clear identification of that should be one of the main indicators that your analysis is closing in on its target.

记住这一点——顺序和功能依赖.注意不要将系统的功能分解为不反映业务价值的单元.经常引用的 ATM 示例:Check Balance 是一个用例,输入 PIN 不是(出于上述原因).但是,您可能希望在执行提取现金时始终检查余额.如果是这种情况,那么您可以使用 include 来表明 Withdraw Cash 包含 Check Balance,但请注意,两个用例都提供业务自身价值.

That in mind -- sequential and functional dependencies. Be careful not to decompose functionality of the system into units that don't reflect business value. The oft-quoted example of an ATM: Check Balance is a Use Case, Enter PIN isn't (for the reasons above). However, you might feasibly want to always Check Balance when performing Withdraw Cash. If this was the case, then you could use an include to show that Withdraw Cash includes Check Balance, but note that both Use Cases provide business value in and of themselves.

这篇关于一个用例可以包含和前置相同的其他用例吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆