|Re: Using JUnit to test Viatra transformations [message #1809753 is a reply to message #1809750]
||Mon, 22 July 2019 15:24
| Zoltan Ujhelyi
Registered: July 2015
it is possible to run VIATRA queries and transformations in JUnit; the error message refers to a configuration issue, most likely caused by missing dependencies. More specifically, this behaviour was introduced in v2.0  that changes the order of a few internal dependencies.
To fix the issue, you have to ensure that the classpath should have the `org.eclipse.viatra.query.runtime`, the `org.eclipse.viatra.query.runtime.rete` and the `org.eclipse.viatra.query.runtime.localsearch` bundles on the Java classpath. More specifically:
1. If you are working with Eclipse plugins, ensure all three mentioned bundles are present to the required plugins section. If you generate a new VIATRA project, the wizard ensures this.
2. If you aim to use VIATRA in a headless environment, you could rely on the `org.eclipse.viatra` : `viatra-query-runtime` Maven dependency to access every required dependency. 
I hope this was helpful; if not, feel free to ask for clarification.
Powered by FUDForum
. Page generated in 0.02288 seconds