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.


  • 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.
  • Models are compared using pluggable 'comparators', which allow for extending EUnit for other kinds of models.
  • 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.
  • 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


EUnit can be installed from the regular Epsilon update sites. These features need to be installed:

  • Epsilon Core: contains the EUnit execution engine.
  • Epsilon Core Development Tools: contains the EUnit Ant task and Eclipse integration.

In addition, these features must be used in order to compare EMF models:

  • Epsilon EMF Integration: contains the required Epsilon Model Connectivity drivers to load EMF models.
  • Epsilon Development Tools for EMF: contains the EUnit comparator for EMF models, based on EMF Compare.

Examples and Screencasts


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