Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xtext-utils unit tests with Tycho?(Trouble with .dmodel files when running JUnit Plug-in test)
xtext-utils unit tests with Tycho? [message #832295] Fri, 30 March 2012 01:54 Go to next message
Joey Mink is currently offline Joey MinkFriend
Messages: 87
Registered: July 2009
Location: Centreville, VA, USA
Member

Hi!

I've got some XtextTest subclasses implementing unit tests on my DSL. It's awesome. But, unfortunately, I can not get them to run with Tycho builds or as a "JUnit Plug-in Test". This seems to be because the XtextTest.testFile(String) method assumes a file is given as a classpath and not a URI. Basically, it would be nice if we could provide a URI from our test plug-in fragment. Then I think it might work in Tycho:

testFile("platform:/plugin/com.my.plugin/resources/my.dmodel");


I was going to try checking out the xtext-utils source and possibly modify it, but it doesn't seem to be cloneable from the google code site (just a blank repository is cloned) - and it can not be browsed via google code either:

http://code.google.com/a/eclipselabs.org/p/xtext-utils/

Anyway, how is everyone else automating the execution of their xtext-utils unit tests? Thanks!
Joey
Re: xtext-utils unit tests with Tycho? [message #832309 is a reply to message #832295] Fri, 30 March 2012 02:23 Go to previous messageGo to next message
Joey Mink is currently offline Joey MinkFriend
Messages: 87
Registered: July 2009
Location: Centreville, VA, USA
Member

On the topic of checking out xtext-utils. unittesting is a git submodule of the xtext-utils, so:

%>git clone https://code.google.com/a/eclipselabs.org/p/xtext-utils/
%>cd xtext-utils
%>git submodule init
%>git submodule update


Now I have the source code Smile
Re: xtext-utils unit tests with Tycho? [message #832533 is a reply to message #832295] Fri, 30 March 2012 08:53 Go to previous messageGo to next message
Rober Morales-Chaparro is currently offline Rober Morales-ChaparroFriend
Messages: 1
Registered: March 2012
Junior Member
Yo must checkout "0.9.x" branch before cloning. Master branch seems empty.
Re: xtext-utils unit tests with Tycho? [message #832957 is a reply to message #832533] Fri, 30 March 2012 19:42 Go to previous message
Joey Mink is currently offline Joey MinkFriend
Messages: 87
Registered: July 2009
Location: Centreville, VA, USA
Member

Finally got my unit tests to execute in Tycho with v0.9.2 of xtext-utils unittesting. I used Spray's source code as a guide - particularly the org.eclipselabs.spray.xtext.tests folder:

http://code.google.com/a/eclipselabs.org/p/spray/source/browse/#git%2Ftests%2Forg.eclipselabs.spray.xtext.tests

It seems there are a few gotchas, and the pom.xml files in this project have the workarounds in place.
Previous Topic:[Xtend] How does variable declaration in switch expression work
Next Topic:Parser doesn't handle SL_COMMENTS correctly
Goto Forum:
  


Current Time: Thu Sep 19 16:31:10 GMT 2024

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

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

Back to the top