Epsilon Unit Testing Framework

EUnit is an unit testing framework built on top of the Epsilon platform. It is specifically designed for testing model management tasks, such as model-to-model transformations, model-to-text transformations and model validations, among others. EUnit can be used to test any model management task that is exposed through an Ant task, even if it is not part of the Epsilon platform.

Features

  • Reuse tests over different sets of data or models
  • Test setup and model management tasks are performed through ANT tasks
  • Test teardown is implicit: models are reloaded automatically
  • Compare models, files and directories transparently with the included assertions
  • Generate test reports in the widely adopted XML format of the <junit> Ant Task
  • View aggregated test results and compare differences graphically in Eclipse
  • Generate models inside the test using EOL
  • Load models to be used in the test from HUTN fragments

Features inherited from EOL

  • Support for simultaneously accessing/modifying many models of (potentially) different metamodels
  • All the usual programming constructs (while and for loops, statement sequencing, variables etc.)
  • Support for those convenient first-order logic OCL operations (select, reject, collect etc.)
  • Ability to create and call methods of Java objects
  • Support for dynamically attaching operations to existing meta-classes and types at runtime
  • Support for cached operations
  • Support for extended properties
  • Support for user interaction
  • Ability to create reusable libraries of operations and import them from different Epsilon (not only EOL) modules

Examples and Screencasts

Reference

Chapter 12 of the Epsilon book provides a complete reference of how tests are organized and specified in EUnit.