0

I am doing model based testing and i've modeled my application with UML diagrams and also wrote all the constrains for testing using OCL, and i was wondering if there is a tool or plugin for eclipse which helps to generate testcases from UML/OCL model which can be used for black-box testing. (thanks in advance)

' @Christian thanks for your reply and below is part of the my OCL expressions

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

'

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130

1 Answers1

0

As your query seems to handle instances of Model classes you could generate EMF (ecore) from your org.eclipse.uml model (create genmodel and select .uml-file as source) and then use Eclipse OCL to execute your queries like described here: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.emf.query.doc/tutorials/oclQueryTutorial.html

Christian
  • 13,285
  • 2
  • 32
  • 49