私はモデルベースのテストを行っており、UML ダイアグラムを使用してアプリケーションをモデル化し、OCL を使用してテストするためのすべての制約も作成しました。UML/OCL モデルからテストケースを生成するのに役立つ Eclipse 用のツールまたはプラグインがあるかどうか疑問に思っていました。ブラックボックステストに使用できます。(前もって感謝します)
' @Christian 返信ありがとうございます。以下は私の OCL 表現の一部です
post: numberOfTrials = numberOfTrials@pre + 1
and if userPin = customer.card.pin and numberOfTrials <= 3
then pinAccepted and result = PinResult::Correct
else not pinAccepted
and if numberOfTrials <= 3
then result = PinResult::Wrong
else result = PinResult::Abort
endif
endif
context ATMController::withdraw(amount:Real) : Boolean
pre: pinAccepted
post: if (amount <= customer.account.balance)
then customer.account.balance =
customer.account.balance@pre - amount
and result = true
else customer.account.balance =
customer.account.balance@pre
and result = false
endif
'