| [news.eclipse.modeling.m2m] Re: [QVTO] Unit testing |
Another question:
Thank you,
Manu.
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.