In several EMF projects I have seen a test model generator. The goal is to generate model instances of a certain model, which can be used for testing. For some tests, it is only important to have an arbitrary instance of a certain size, and sometimes it just makes sense to create arbitrary model instances to detect failures. We (Andrea, Metteo, Hong and Stephan) have developed a geneeirc generetor appyable for arbitrary ecore models. I am interested in feedback on this, we plan to make it available under EPL in the EMF Client Platform Project.
Models can be created like this:
1. Generating Ecore model (Library) without using any further Configuration:
2. Generating Ecore model (Ecore ecore) using ModelGeneratorConfiguration:
3. Changing values of the configuration (OCL model):
Tuesday, February 8, 2011
Subscribe to:
Post Comments (Atom)


Hi,
ReplyDeleteyou should take a look at Alloy (http://alloy.mit.edu/alloy4/) which can handle the creation of models based on a metamodel (although they don't call it like that).
Additionally, you will have problems with your approach if you apply a test-first approach, because you cannot create models for an non-existing metamodel.
However, it would be interesting to see which "coverage criteria" you use to generate metamodel instances. For example, if A has an association with a multiplicity of 9999 to B, how many Bs you would create?
Cheers,
Siamak