[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [QVTO] Unit testing

Thank you very much Sergey. The plugin helps me to understanding a little more the qvto architecture (is there some docs?). I think the qvto transformations are only able to run in a plugin context. Am i right?
I would like to know if there is a solution to make a 'stand alone' (not a plugin) java application using the qvto api which run transfos and unit-tests?
I think i understand how to launch a transfo and test the result. It is what the plugin does. But i want to test each mapping separatly. How can i just run a mapping or a set of mappings from a transfo?


Another question:

Does qvto store compiled transfos into files? So that, i could run transfos directly from the compiled version.

Thank you,

Manu.


Sergey Boyko a écrit :
Hi Emmanuel,

QVTO build provides a number of unit-tests which proceed exactly as you described.
Look at org.eclipse.m2m/org.eclipse.m2m.qvt.oml/tests/org.eclipse.m2m.tests.qvt.oml plugin. There's TransformTests.interpreterSuite() suite that accumulates unit-tests with that execution sequence. Script files (.qvto), input and output models is located under parserTestData/models folder.


For output models comparison we use our own engine (package org.eclipse.m2m.tests.qvt.oml.api.framework.comparator.*) that implements algorithm for calculating Selkow's distance of two
trees.


Regards,
  Sergey

Emmanuel.Leguy wrote:
Hello,

I would like to make unit testing (like JUnit) on my qvto transformations. I want to do it at the mapping level. To do so, for each mapping, i could proceed as follows;
- manually build in and out models
- execution of the mapping with the in model
- comparison (with emf compare?) of the generated model with the manually build out model.
I am at the very begining and i am looking for some ways to do it.
A first idea is to make a java application using the qvto api to launch separatly the mappings. I don't know if it is possible? The best method?
Has anyone already worked on this?


Thank you,

Emmanuel.