0

私はモデルベースのテストを行っており、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

'

4

1 に答える 1

0

クエリは Model クラスのインスタンスを処理しているように見えるため、org.eclipse.uml モデルから EMF (ecore) を生成し (genmodel を作成し、ソースとして .uml ファイルを選択)、Eclipse OCL を使用して、ここで説明されているようにクエリを実行できます。http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.emf.query.doc/tutorials/oclQueryTutorial.html

于 2013-02-07T18:42:06.943 に答える