Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] Questions on Data Generator Feature(Generating test data)
[Texo] Questions on Data Generator Feature [message #716607] Wed, 17 August 2011 20:42 Go to next message
Benoit Lapointe is currently offline Benoit LapointeFriend
Messages: 1
Registered: August 2011
Junior Member
Hi,

I tried to generate test data using texo's default generators and using a model code based on this ecore: <eclipse site>//dev.eclipse.org/viewsvn/viewvc.cgi/plugins/trunk/org.eclipse.gmt.modisco.omg.kdm/model/kdm.ecore?root=Modeling_MODISCO&view=log

Unfortunately the data generated represents only a subset of what is described in the model. For example, the kdm ecore defines a deep inheritance tree of elements; however, there are only a subset of these types that are instantiated when running texo. I tested many variables settings and included manually models and elements in the eClass startlist, but there seemed to be no way to request for multiple types to be used.

My question is: what are the limitations of the Test Data Generation feature? It is said that it has been tested on 40+ models, does it includes big models like kdm? I see that there are extension mechanisms, but how can they be used to instantiate a model containing a certain set of "required" types (or at least instantiate more than one subtype for a given interface/abstract class)?

Regards,

Ben
Re: [Texo] Questions on Data Generator Feature [message #716773 is a reply to message #716607] Thu, 18 August 2011 12:26 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Ben,
There are no known limitations, the code does not instantiate abstract classes/interfaces (that's about it), if there
are ereferences refering an abstract parent type then the logic will try to find a concrete subtype to create, if you
explicitly specify start eclasses then it should definitely generated instances for those.

I am looking at your kdm.ecore (okay if I add it to the test model set?). The first problem I am hitting (which I will
solve) is that there is a circular dependency between epackages, Texo fails on this, but it shouldn't ofcourse. After I
have solved that I can try the data generation. Can you send me some code snippets which you have tried?

Texo extensively uses the data generation for testing jpa and xmi/xml serialization. All test models (40+) are handled.
The way the Texo testcases work like this:
1- generate the Texo pojos
2- generate test data (eobjects) using the data generator
3- convert the eobjects to Texo pojos
4- persist the texo pojos (in xmi/xml or jpa)
5- read the data again from the persistence (xmi/xml/jpa)
6- convert to eobjects
7- compare against the original testset (from step 2) using EMF Compare and fail if there are any differences

So the Texo testcases hardly have any manually created testdata.

gr. Martin


I can test myself with kdm.ecore, but if you have a code snippet of the

On 08/17/2011 10:42 PM, Benoit Lapointe wrote:
> Hi,
>
> I tried to generate test data using texo's default generators and using a model code based on this ecore: <eclipse
> site>//dev.eclipse.org/viewsvn/viewvc.cgi/plugins/trunk/org.eclipse.gmt.modisco.omg.kdm/model/kdm.ecore?root=Modeling_MODISCO&view=log
>
>
> Unfortunately the data generated represents only a subset of what is described in the model. For example, the kdm ecore
> defines a deep inheritance tree of elements; however, there are only a subset of these types that are instantiated when
> running texo. I tested many variables settings and included manually models and elements in the eClass startlist, but
> there seemed to be no way to request for multiple types to be used.
>
> My question is: what are the limitations of the Test Data Generation feature? It is said that it has been tested on 40+
> models, does it includes big models like kdm? I see that there are extension mechanisms, but how can they be used to
> instantiate a model containing a certain set of "required" types (or at least instantiate more than one subtype for a
> given interface/abstract class)?
>
> Regards,
>
> Ben


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Texo] Questions on Data Generator Feature [message #717139 is a reply to message #716773] Fri, 19 August 2011 12:01 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Benoit,
I worked with your kdm.ecore, I added it to the testset of Texo. I noticed a few things which maybe confuses the data
generation, several eclasses with interface==true extended eclasses with interface=false. I changed this (see the
attached kdm.ecore) and also solved some issue with Texo code generation. I published a new Texo build a minute ago.

Can you try with this kdm.ecore (compare with what you have to see the differences) and the latest texo build to see
what happens?

If you still get problems, can you post the code snippet? I have now the kdm.ecore in my testset so I can easily
reproduce issues.

gr. Martin

On 08/18/2011 02:26 PM, Martin Taal wrote:
> Hi Ben,
> There are no known limitations, the code does not instantiate abstract classes/interfaces (that's about it), if there
> are ereferences refering an abstract parent type then the logic will try to find a concrete subtype to create, if you
> explicitly specify start eclasses then it should definitely generated instances for those.
>
> I am looking at your kdm.ecore (okay if I add it to the test model set?). The first problem I am hitting (which I will
> solve) is that there is a circular dependency between epackages, Texo fails on this, but it shouldn't ofcourse. After I
> have solved that I can try the data generation. Can you send me some code snippets which you have tried?
>
> Texo extensively uses the data generation for testing jpa and xmi/xml serialization. All test models (40+) are handled.
> The way the Texo testcases work like this:
> 1- generate the Texo pojos
> 2- generate test data (eobjects) using the data generator
> 3- convert the eobjects to Texo pojos
> 4- persist the texo pojos (in xmi/xml or jpa)
> 5- read the data again from the persistence (xmi/xml/jpa)
> 6- convert to eobjects
> 7- compare against the original testset (from step 2) using EMF Compare and fail if there are any differences
>
> So the Texo testcases hardly have any manually created testdata.
>
> gr. Martin
>
>
> I can test myself with kdm.ecore, but if you have a code snippet of the
>
> On 08/17/2011 10:42 PM, Benoit Lapointe wrote:
>> Hi,
>>
>> I tried to generate test data using texo's default generators and using a model code based on this ecore: <eclipse
>> site>//dev.eclipse.org/viewsvn/viewvc.cgi/plugins/trunk/org.eclipse.gmt.modisco.omg.kdm/model/kdm.ecore?root=Modeling_MODISCO&view=log
>>
>>
>>
>> Unfortunately the data generated represents only a subset of what is described in the model. For example, the kdm ecore
>> defines a deep inheritance tree of elements; however, there are only a subset of these types that are instantiated when
>> running texo. I tested many variables settings and included manually models and elements in the eClass startlist, but
>> there seemed to be no way to request for multiple types to be used.
>>
>> My question is: what are the limitations of the Test Data Generation feature? It is said that it has been tested on 40+
>> models, does it includes big models like kdm? I see that there are extension mechanisms, but how can they be used to
>> instantiate a model containing a certain set of "required" types (or at least instantiate more than one subtype for a
>> given interface/abstract class)?
>>
>> Regards,
>>
>> Ben
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
  • Attachment: kdm.ecore
    (Size: 97.22KB, Downloaded 276 times)
Previous Topic:Strange behaviour of EContentAdapter
Next Topic:Problem/question using the createFromString and createToString functions
Goto Forum:
  


Current Time: Tue Apr 16 18:16:08 GMT 2024

Powered by FUDForum. Page generated in 1.69334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top