Abstract
In this paper, we deal with errors in metamodels. Metamodels define the abstract syntax of modeling languages. They play a central role in the Model-Driven Architecture. Other artifacts like models or tools are based on them and have to be changed if the metamodel is changed. Consequently, correcting errors in a metamodel can be quite expensive as dependent artifacts have to be adapted to the corrected metamodel. We argue that metamodels should be tested systematically with automated tests. We present a corresponding approach that allows automated metamodel testing based on a test specification. From a test specification, multiple test models can be derived. Each test model defines a potential instance of the metamodel under test. A positive test model defines a potential instance that should be an actual instance of the metamodel; a negative test model defines one that should not. We exemplify our approach with a metamodel for defining a company’s structure. Finally, we present MMUnit, an implementation of our approach that builds on the Eclipse platform and integrates the JUnit framework. MMUnit allows to test EMF-based metamodels, which can contain additional constraints, e.g. constraints expressed in OCL.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Miller, J., Mukerji, J.: MDA Guide Version 1.0.1. Technical report, Object Management Group (OMG) (2003)
Object Management Group: Meta Object Facility (MOF) 2.0 Core Specification (2006)
Beck, K.: Test Driven Development: By Example. Addison-Wesley Professional, Reading (2002)
Beizer, B.: Software Testing Techniques. John Wiley & Sons, Inc, Chichester (1990)
Utting, M., Legeard, B.: Practical Model-Based Testing: A Tools Approach. Morgan Kaufmann Publishers Inc., San Francisco (2006)
Sourceforge: JUnit (2008), http://junit.sourceforge.net
Abdurazik, A., Offutt, J.: Using UML Collaboration Diagrams for Static Checking and Test Generation. In: Evans, A., Kent, S., Selic, B. (eds.) UML 2000. LNCS, vol. 1939. Springer, Heidelberg (2000)
Nebut, C., Fleurey, F.: Automatic test generation: A use case driven approach. IEEE Trans. Softw. Eng. 32(3), 140–155 (2006)
Offutt, J., Abdurazik, A.: Generating Tests from UML Specifications. In: France, R.B., Rumpe, B. (eds.) UML 1999. LNCS, vol. 1723. Springer, Heidelberg (1999)
Prenninger, W., Pretschner, A.: Abstractions for Model-Based Testing. Electr. Notes Theor. Comput. Sci. 116, 59–71 (2005)
Küster, J.M.: Definition and validation of model transformations. Software and Systems Modeling V5(3), 233–259 (2006)
Wang, J., Kim, S.K., Carrington, D.: Verifying metamodel coverage of model transformations. In: ASWEC 2006 (2006)
Brottier, E., Fleurey, F., Steel, J., Baudry, B., Traon, Y.L.: Metamodel-based test generation for model transformations: an algorithm and a tool. In: ISSRE 2006: Proceedings of the 17th International Symposium on Software Reliability Engineering, Washington, DC, USA, pp. 85–94. IEEE Computer Society, Los Alamitos (2006)
Purdom, P.: A sentence generator for testing parsers. bit 12(3), 366–375 (1972)
Lämmel, R.: Grammar adaptation. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 550–570. Springer, Heidelberg (2001)
Eclipse Foundation: Eclipse (2008), http://www.eclipse.org
Eichler, H., Sadilek, D.A., Scheidgen, M., Soden, M., Wachsmuth, G., Weißleder, S.: Frameworks to create language definitions and tools on top of the eclipse modelling project (poster). In: EclipseCon 2008 (2008)
NUnit.org: NUnit (2008), http://www.nunit.org
Favre, J.M.: Meta-model and model co-evolution within the 3D software space. In: ELISA 2003, pp. 98–109 (2003)
Andrews, A.A., France, R.B., Ghosh, S., Craig, G.: Test adequacy criteria for uml design models. Softw. Test., Verif. Reliab. (2003)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sadilek, D.A., Weißleder, S. (2008). Testing Metamodels. In: Schieferdecker, I., Hartman, A. (eds) Model Driven Architecture – Foundations and Applications. ECMDA-FA 2008. Lecture Notes in Computer Science, vol 5095. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69100-6_20
Download citation
DOI: https://doi.org/10.1007/978-3-540-69100-6_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69095-5
Online ISBN: 978-3-540-69100-6
eBook Packages: Computer ScienceComputer Science (R0)