This article discusses various uses of OCL (Object Constraint Language) for both developers and testers. IT also enumerates the many advantages of the language, which is part of the UML specification.
The Dresden OCL Toolkit is all about the Object Constraint Language (OCL). OCL is part of the well-known Unified Modelling Language (UML). It extends the UML's graphical notation with the possiblity of adding more formally defined textual constraints on method invocations and on class structures as a whole. Many aspects of a model that cannot be expressed adequately with the graphical notation alone find their representation in OCL constraints.
So, where does the Dresden OCL Toolset come into play? As its name indicates it is not some standalone solution. Instead, many of these tools are meant to be used as a library, integrated into other tools, but there exist also some standalone tools in the Toolkit.
In contrast to manual selection of input value boundaries, we present an approach to derive them automatically from OCL expressions of UML state machines and UML class diagrams. We statically analyze the interdependence of OCL expressions within the system model and transform the model into a transition tree and investigate the tree's paths. The corresponding test suite is focused on detecting errors that result from differences between constraints in the model and constraints in the system under test.
A. Braganca, and R. Machado. SPLC '07: Proceedings of the 11th International Software Product Line Conference, page 3--12. Washington, DC, USA, IEEE Computer Society, (2007)
R. Schmidberger, and S. Biermann. Informatik 2007 - Band 2, GI-Edition, (September 2007)MR: Zeigt beispielhaft die Anwendung von OCL für den Systemtest. Auch der Realisierungsweg wird gezeigt.
ISBN 978-3-88579-204-8.
J. Offutt, and A. Abdurazik. UML'99 - The Unified Modeling Language. Beyond the Standard. Second International Conference, Fort Collins, CO, USA, October 28-30. 1999, Proceedings, 1723, page 416--429. Springer, (1999)MR: Die 'Transition Table' aus UML-Statechart-Werkzeugen wird eingelesen und entsprechend definierten Coverage-Criteria werden daraus Testfälle generiert. Ein weiterer Algo. kümmert sich um die Test Data indem die Werte generiert werden, die zum erreichen von bestimmten Zuständen notwendig sind.
Es gibt keine konkrete Aussage über erwartete Testergebnisse. Den Algorithmen kann man aber vorsichtig ableiten, dass mit Test Data auch die erwarteten Ergebnisse gemeint sind..
?. Lecture Notes in Computer Science Springer, 1 edition, (2002)MR: eher für den fortgeschrittenen Einsatz von OCL oder sogar für die Forschung rund um OCL.
J. Warmer, and A. Kleppe. Addison Wesley, 2. A. edition, (2003)MR: Referenz für OCL
Wertvoll: Es wird gezeigt wie mit OCL Modelle gebaut werden.
MDA eher nur am Rande erklärt
Wichtigster Satz (Kapitel 3.2):
The use of OCL strongly relies on the types (classes, datatypes, and so on) defined in a UML class diagram. This diagram should be build first..
D. Sokenou. TU Berlin, Fakultät für Elektrotechnik und Informatik, (March 2006)MR: Interessant für IST-SPL sind vor allem folgende Kapitel:
5-Testbarkeit von UML-Modellen: alle Diagrammtypen werden auf ihre Eignung für den Test untersucht
10-UML-basierte Testorakel: mit Hilfe von Zustandsdiagrammen und OCL-Constraints
Leider fehlt der Blick auf den Systemtest.
Besonderheit: die eingesetzte aspektorientierte Technik erlaubt die OCL-Constraints in Aspekte umzuwandeln und zur Ladezeit so in den Testcode einweben, dass die getestete Systemimplementierung nicht neu versioniert werden muss.