用例:独立还是不独立?

发布于 2024-10-14 12:03:51 字数 96 浏览 7 评论 0原文

如果网站会员可以查看自己的个人资料和其他用户的个人资料,我是否应该制作两个单独的用例?应该是会员-查看自己的资料和会员-查看别人的资料吗?或者只是会员 - 查看个人资料就足够了?

Should I make two separate use cases if a Member of the website can View their own personal profile and those of other users? Should it be Member - View Own Profile and Member-View Others' Profile? Or just Member - View Profile is enough?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

2024-10-21 12:03:51

根据评论,一个用例可以具有应用程序的一个完整场景/特性/功能。因此,如果您谈论的是成员查看个人资料的用例,那么它将是一个用例,但如果您谈论的是用于验证的测试用例,那么它将是两个测试用例。

会员查看自己的个人资料并不意味着他也可以查看其他人的个人资料。因此,您需要有两个测试用例来验证这两种可能性。

另一方面,这方面还有更多的情况 - 您应该有像成员能够编辑他的个人资料、编辑其他个人资料的情况,这也可以转到各个字段。成员能够编辑他的所有详细信息,但能够编辑层次结构中低于他的其他特定成员的一些详细信息,并且不应该能够编辑层次结构中高于他的其他成员的任何详细信息等。

As per comments, An use case can have one complete scenario/feature/function of the application. Hence if you are talking about use-case of member viewing profile, then it will be one use case but if you are talking about test cases for verification, then it would be two test cases.

A member viewing own profile does not mean that he can view others profiles too. Hence you need to have two test cases for verifying both the possibilities.

On the other hand, there are few more cases in this too - you should have cases like member able to edit his profile, edit others profile and this can also go to individual fields too. Member being able to edit all his details, but able to edit few details of other particular members below him in hierarchy and should not be able to edit any details of other members above him in hierarchy etc.

昇り龍 2024-10-21 12:03:51

我会说三个用例,如下所示:
用例

I would say the three use cases, like this:
Use cases

萌面超妹 2024-10-21 12:03:51

用例展示了参与者如何使用系统来实现他们的目标。因此用例的构建必须遵循这些目标。您是否会说,一个演员(例如您的网络应用程序的访问者)会使用您的应用程序只是为了查看他的个人资料?他会用它来查看其他用户的个人资料吗?如果这些是单独的目标,那么用例应该是单独的。但是,如果您希望允许访问者查看有关站点上其他用户的信息,一个用例就足够了。

Use cases demonstrate how actors use the system to achieve their goals. So structuring of use cases must adhere to these goals. Would you say, that an actor, e.g. visitor of your web app, would use your appication just to view his profile? Would he use it just to view profile some other user? If those are separate goals, then the use cases should be separate. But if you want to allow a visitor to see information about other users on site, one use case suffices.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文