Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Substitute for xtext-utils unittesting?
Substitute for xtext-utils unittesting? [message #1747604] Wed, 16 November 2016 12:25 Go to next message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 109
Registered: June 2013
Senior Member
Hi,

as Google Code is gone and with it the xtext-utils unittesting update site at Google Code/Eclipse Labs, I wonder whether there exists a substitute for it (perhaps even at eclipse.org itself)?

Any pointers are greatly appreciated.

Andreas
Re: Substitute for xtext-utils unittesting? [message #1747605 is a reply to message #1747604] Wed, 16 November 2016 12:27 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 544
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Andreas!

You are right, this was gone unfortunately. Did you like it? I could imagine to revive the project at GitHub.

~Karsten
Re: Substitute for xtext-utils unittesting? [message #1747606 is a reply to message #1747605] Wed, 16 November 2016 12:31 Go to previous messageGo to next message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 109
Registered: June 2013
Senior Member
Yes, I (or rather a student who did a Google Summer of Code project with us, the Code Recommenders project) found it quite helpful.

Publishing it at Github sounds great.

FWIW, there already exist an unofficial fork at Github. It did not publish an update site, however.
Re: Substitute for xtext-utils unittesting? [message #1747611 is a reply to message #1747606] Wed, 16 November 2016 13:07 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 544
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Thanks for the feedback, Andreas! I think there are chances that I could work on it in the near future. And thanks for pointing me to the project. I think I would start cloning this fork, make that one the official one and provide an update site.
Re: Substitute for xtext-utils unittesting? [message #1748244 is a reply to message #1747604] Mon, 21 November 2016 14:42 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 544
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Andreas,

I have revived the project here: https://github.com/itemis/xtext-testing

Since Eclipselabs does not exist anymore, I have changed the namespace to com.itemis.xtext.testing and started with a 0.1 release. This contains basically the old state with adoptions to the new Xtext release and adds deployment possibility to Bintray. The updatesite is now here: https://dl.bintray.com/itemis/generic/xtext-testing/updates/

I will work on the build side further to deploy also Maven artifacts and hopefully to Eclipse Marketplace. Then I would make a first 1.0 version.

~Karsten
Re: Substitute for xtext-utils unittesting? [message #1748256 is a reply to message #1748244] Mon, 21 November 2016 15:42 Go to previous messageGo to next message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 109
Registered: June 2013
Senior Member
Karsten Thoms wrote on Mon, 21 November 2016 09:42
Since Eclipselabs does not exist anymore, I have changed the namespace to com.itemis.xtext.testing and started with a 0.1 release. This contains basically the old state with adoptions to the new Xtext release and adds deployment possibility to Bintray.

I am afraid this is not quite a drop-in replacement, as the no-args constructor of XtextTest is gone.

Can you please advise me how to migrate, ideally by commenting on this change in Gerrit. Thank you very much.
Re: Substitute for xtext-utils unittesting? [message #1748324 is a reply to message #1748256] Tue, 22 November 2016 10:15 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 386
Registered: June 2014
Senior Member
I have posted an answer on the gerrit from my best understanding. Answer cross-posted here:

I am just looking at picking up the regenerated xtext-utils too.
The no-args constructor was probably removed by accident in https://github.com/itemis/xtext-testing/commit/d4954482017cc8ee7b8b9d509bcbde5d26f3c080 when XtestTest was refactored into XtextTest and XtextTestBase.
AFAICT, to restore the old behaviour you should do super("/");
Re: Substitute for xtext-utils unittesting? [message #1748327 is a reply to message #1748324] Tue, 22 November 2016 10:21 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 386
Registered: June 2014
Senior Member
PS I did a PR for this: https://github.com/itemis/xtext-testing/pull/1
Re: Substitute for xtext-utils unittesting? [message #1748352 is a reply to message #1748324] Tue, 22 November 2016 11:58 Go to previous messageGo to next message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 109
Registered: June 2013
Senior Member
Jonah Graham wrote on Tue, 22 November 2016 05:15
I have posted an answer on the gerrit from my best understanding. Answer cross-posted here:

I am just looking at picking up the regenerated xtext-utils too.
The no-args constructor was probably removed by accident in https://github.com/itemis/xtext-testing/commit/d4954482017cc8ee7b8b9d509bcbde5d26f3c080 when XtestTest was refactored into XtextTest and XtextTestBase.
AFAICT, to restore the old behaviour you should do super("/");

Thanks, Jonas, that already helped somewhat. Alas, I am still seeing test failures that I didn't see before with the EclipseLabs version of xtext-testing:
smoketestLexerHexaFloatPoint(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0.002 sec  <<< ERROR!
java.lang.NullPointerException: null
	at com.itemis.xtext.testing.XtextTestBase.testNotTerminal(XtextTestBase.java:355)
	at org.eclipse.recommenders.templates.LexerTemplatesTest.smoketestLexerHexaFloatPoint(LexerTemplatesTest.java:100)

smoketestLexerBinaryToken(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0 sec
testLexerANYOTHERToken(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0 sec
smoketestLexerDecimalFloatPointToken(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0.001 sec  <<< FAILURE!
java.lang.AssertionError: 0._01F
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.assertTrue(Assert.java:41)
	at org.junit.Assert.assertFalse(Assert.java:64)
	at com.itemis.xtext.testing.XtextTestBase.testNotTerminal(XtextTestBase.java:354)
	at org.eclipse.recommenders.templates.LexerTemplatesTest.smoketestLexerDecimalFloatPointToken(LexerTemplatesTest.java:84)

testLexerIDToken(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0 sec  <<< ERROR!
java.lang.NullPointerException: null
	at com.itemis.xtext.testing.XtextTestBase.testNotTerminal(XtextTestBase.java:355)
	at org.eclipse.recommenders.templates.LexerTemplatesTest.testLexerIDToken(LexerTemplatesTest.java:64)

smoketestLexerHexaToken(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0 sec
smoketestLexerOctalToken(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0 sec  <<< ERROR!
java.lang.NullPointerException: null
	at com.itemis.xtext.testing.XtextTestBase.testNotTerminal(XtextTestBase.java:355)
	at org.eclipse.recommenders.templates.LexerTemplatesTest.smoketestLexerOctalToken(LexerTemplatesTest.java:144)

smoketestLexerDecimalToken(org.eclipse.recommenders.templates.LexerTemplatesTest)  Time elapsed: 0 sec  <<< ERROR!
java.lang.NullPointerException: null
	at com.itemis.xtext.testing.XtextTestBase.testNotTerminal(XtextTestBase.java:355)
	at org.eclipse.recommenders.templates.LexerTemplatesTest.smoketestLexerDecimalToken(LexerTemplatesTest.java:131)

Any idea what might be causing those?
Re: Substitute for xtext-utils unittesting? [message #1749061 is a reply to message #1747604] Thu, 01 December 2016 14:16 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 544
Registered: July 2009
Location: Dortmund, Germany
Senior Member

I have just published version 0.2.0, which contains Jonah's change.
Previous Topic:Whitespace-Aware Languages with unindented Single line comment
Next Topic:Variable/String Substitution Grammar with ${var} Style
Goto Forum:
  


Current Time: Wed Oct 18 15:02:38 GMT 2017

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

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