Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5095))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Miller, J., Mukerji, J.: MDA Guide Version 1.0.1. Technical report, Object Management Group (OMG) (2003)

    Google Scholar 

  2. Object Management Group: Meta Object Facility (MOF) 2.0 Core Specification (2006)

    Google Scholar 

  3. Beck, K.: Test Driven Development: By Example. Addison-Wesley Professional, Reading (2002)

    Google Scholar 

  4. Beizer, B.: Software Testing Techniques. John Wiley & Sons, Inc, Chichester (1990)

    Google Scholar 

  5. Utting, M., Legeard, B.: Practical Model-Based Testing: A Tools Approach. Morgan Kaufmann Publishers Inc., San Francisco (2006)

    Google Scholar 

  6. Sourceforge: JUnit (2008), http://junit.sourceforge.net

  7. 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)

    Google Scholar 

  8. Nebut, C., Fleurey, F.: Automatic test generation: A use case driven approach. IEEE Trans. Softw. Eng. 32(3), 140–155 (2006)

    Article  Google Scholar 

  9. Offutt, J., Abdurazik, A.: Generating Tests from UML Specifications. In: France, R.B., Rumpe, B. (eds.) UML 1999. LNCS, vol. 1723. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  10. Prenninger, W., Pretschner, A.: Abstractions for Model-Based Testing. Electr. Notes Theor. Comput. Sci. 116, 59–71 (2005)

    Article  Google Scholar 

  11. Küster, J.M.: Definition and validation of model transformations. Software and Systems Modeling V5(3), 233–259 (2006)

    Article  Google Scholar 

  12. Wang, J., Kim, S.K., Carrington, D.: Verifying metamodel coverage of model transformations. In: ASWEC 2006 (2006)

    Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Purdom, P.: A sentence generator for testing parsers. bit 12(3), 366–375 (1972)

    Article  MathSciNet  MATH  Google Scholar 

  15. Lämmel, R.: Grammar adaptation. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 550–570. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  16. Eclipse Foundation: Eclipse (2008), http://www.eclipse.org

  17. 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)

    Google Scholar 

  18. NUnit.org: NUnit (2008), http://www.nunit.org

  19. Favre, J.M.: Meta-model and model co-evolution within the 3D software space. In: ELISA 2003, pp. 98–109 (2003)

    Google Scholar 

  20. Andrews, A.A., France, R.B., Ghosh, S., Craig, G.: Test adequacy criteria for uml design models. Softw. Test., Verif. Reliab. (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Ina Schieferdecker Alan Hartman

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics