2013-02-04 33 views
0

我在做基於模型的測試,並且使用UML圖模擬了我的應用程序,並且還編寫了使用OCL進行測試的所有約束,並且我想知道是否有工具或eclipse的插件,這有助於從UML/OCL模型生成可用於黑盒測試的測試用例。 (在此先感謝)在eclipse中從UML/OCL模型生成自動化測試用例

「 您的回覆@Christian感謝,下面是我的OCL表達式

post: numberOfTrials = [email protected] + 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 = 
[email protected] - amount 
and result = true 
else customer.account.balance = 
[email protected] 
and result = false 
endif 

的一部分」

+0

你可以舉一個例子來說明你的OCL EXP ressions?他們是否在實例級別檢查模型?如果是,只需用EMF生成代碼就足夠了。 – Christian

+0

@Christian我添加了我使用的OCL表達式的例子。 –

回答