Testing Metamodels

  • Authors:
  • Daniel A. Sadilek;Stephan Weißleder

  • Affiliations:
  • Humboldt-Universität zu Berlin, Berlin, Germany 10099;Humboldt-Universität zu Berlin, Berlin, Germany 10099

  • Venue:
  • ECMDA-FA '08 Proceedings of the 4th European conference on Model Driven Architecture: Foundations and Applications
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

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.