2

假设我正在做一个Use Case关于填写测验的事情。您只有 5 分钟的时间来完成该测验。在进行Use Case“填写测验”时,我应该如何表示有时间限制,然后Use Case完成?我只是用文字写出来还是有什么更正式的用法?

我的用例可能是什么的草图:

 1. The Actor tells the System he's ready to start the quiz.
 2. The System presents the Actor with the first question of the Quiz and its 4 possible answers and tells him how much time he has left.
 3. The Actor tells the System what is his chosen answer (a number between 1 and 4).

Repeat steps 2-3 until there are no questions left.

 4. The System registers the results of the quiz.

我可以在上面显示的所有操作之间进行操作,以检查剩余时间何时结束,但可能有更好的方法来显示这一点。

谢谢

4

2 回答 2

6

您可以使用另一种流超时情况,例如

Alternative Flow 1: Timeout
2. The System detects that ... 
于 2010-07-16T17:20:41.270 回答
0

更准确地说,但总体上同意其他答案,对于这种情况,Alistair Cockburn(编写有效的用例)建议使用扩展用例(备用流程),这将在其扩展点中有时间限制。以文本形式,您可以轻松地使用可能发生超时的场景行数范围。

于 2010-09-24T21:23:03.970 回答