Abstract
The Model-Driven Architecture (MDA) approach for constructing software systems advocates a stepwise refinement and transformation process starting from high-level models to concrete program code. In contrast to numerous research efforts that try to generate executable function code from models, we propose a novel approach termed model-driven monitoring. On the model level the behavior of an operation is specified with a pair of UML composite structure diagrams (visual contract), a visual notation for pre- and post-conditions. The specified behavior is implemented by a programmer manually. An automatic translation from our visual contracts to JML assertions allows for monitoring the hand-coded programs during their execution.
In this paper we present how we extend our approach to allow for model-driven unit testing, where we utilize the generated JML assertions as test oracles. Further, we present an idea how to generate sufficient test cases from our visual contracts with the help of model-checking techniques.
This paper is an abbreviated version of our same-titled contribution to MoDeV2a 2006. For related work, refer to the longer version in the MoDeV2a 2006 workshop proceedings or to our web page at http://www.upb.de/cs/ag-engels.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Meservy, T.O., Fenstermacher, K.D.: Transforming software development: An MDA road map. IEEE Computer 38(9), 52–58 (2005)
Lohmann, M., Sauer, S., Engels, G.: Executable visual contracts. In: Erwig, M., Schürr, A. (eds.) 2005 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC’05), pp. 63–70. IEEE Computer Society Press, Los Alamitos (2005)
Engels, G., Lohmann, M., Sauer, S., Heckel, R.: Model-driven monitoring: An application of graph transformation for design by contract. In: International Conference on Graph Transformation (ICGT) 2006, September 2006 (accepted for publication, 2006)
Heckel, R., Lohmann, M.: Model-driven development of reactive informations systems: From graph transformation rules to JML contracts. International Journal on Software Tools for Technology Transfer (STTT) (accepted for publication, 2006)
Meyer, B.: Applying ”Design by Contract”. IEEE Computer 25(10), 40–51 (1992)
Leavens, G., Cheon, Y.: Design by Contract with JML (2003)
Beck, K.: Test Driven Development: By Example. Addison-Wesley Professional, Reading (2002)
Beck, K.: Extreme Programming Explained. Embrace Change. The XP Series. Addison-Wesley Professional, Reading (1999)
Heckel, R., Lohmann, M.: Towards model-driven testing. Electr. Notes Theor. Comput. Sci. 82(6) (2003)
Antoy, S., Hamlet, D.: Automatically checking an implementation against its formal specification. IEEE Transactions on Software Engineering 26(1), 55–69 (2000), doi:10.1109/32.825766
OMG (Object Management Group): UML 2.0 superstructure specification - revised final adopted specification (2004)
Heckel, R., Ehrig, H., Wolter, U., Corradini, A.: Double-pullback transitions and coalgebraic loose semantics for graph transformation systems. APCS (Applied Categorical Structures) 9(1), 83–110 (2001)
Habel, A., Heckel, R., Taentzer, G.: Graph grammars with negative application conditions. Fundamenta Informaticae 26(3,4), 287–313 (1996)
Binder, R.V.: Testing Object-Oriented Systems. Addison-Wesley, Reading (2000)
Rensink, A., Schmidt, Á., Varró, D.: Model checking graph transformations: A comparison of two approaches. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 226–241. Springer, Heidelberg (2004)
Lohmann, M., Engels, G., Sauer, S.: Model-driven monitoring: Generating assertions from visual contracts. In: 21st IEEE/ACM International Conference on Automated Software Engineering (ASE) 2006 Demonstration Session, September 2006, ACM Press, New York (2006)
Rensink, A.: The GROOVE simulator: A tool for state space generation. In: Pfaltz, J.L., Nagl, M., Böhlen, B. (eds.) AGTIVE 2003. LNCS, vol. 3062, pp. 479–485. Springer, Heidelberg (2004)
Cheon, Y., Leavens, G.T.: A simple and practical approach to unit testing: The JML and JUnit way. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 231–255. Springer, Heidelberg (2002)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Engels, G., Güldali, B., Lohmann, M. (2007). Towards Model-Driven Unit Testing. In: Kühne, T. (eds) Models in Software Engineering. MODELS 2006. Lecture Notes in Computer Science, vol 4364. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69489-2_23
Download citation
DOI: https://doi.org/10.1007/978-3-540-69489-2_23
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69488-5
Online ISBN: 978-3-540-69489-2
eBook Packages: Computer ScienceComputer Science (R0)