A case for test-code generation in model-driven systems

  • Authors:
  • Matthew J. Rutherford;Alexander L. Wolf

  • Affiliations:
  • Department of Computer Science, University of Colorado, Boulder, Colorado;Department of Computer Science, University of Colorado, Boulder, Colorado

  • Venue:
  • Proceedings of the 2nd international conference on Generative programming and component engineering
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

A primary goal of generative programming and model-driven development is to raise the level of abstraction at which designers and developers interact with the software systems they are building. During initial development, the benefits of abstraction are clear. However, during testing and maintenance, increased distance from the implementation can be a disadvantage. We view test cases and test harnesses as an essential bridge between the high-level specifications and the implementation. As such, the generation of test cases for fully generated components and test harnesses for partially generated components is of fundamental importance to model-driven systems. In this paper we present our experience with test-case and test-harness generation for a family of model-driven, component-based distributed systems. We describe our development tool, MODEST, and motivate our decision to invest the extra effort needed to generate test code. We present our approach to test-case and test-harness generation and describe the benefits to developers and maintainers of generated systems. Furthermore, we quantify the relative cost of generating test code versus application code and find that the artifact templates for producing test code are simpler than those used for application code. Given the described benefits to developers and maintainers and the relatively low cost of test-code development, we argue that test-code generation should be a fundamental feature of model-driven development efforts.