Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative MyDslParsingTest does not fail maven build (No tests found) #2866

Open
mchlrch opened this issue Dec 6, 2023 · 2 comments
Open

Comments

@mchlrch
Copy link

mchlrch commented Dec 6, 2023

I created a new Xtext project using Xtext 2.33.0 with the wizard: File > New > Other ... > Xtext Project

I can run the generated MyDslParsingTest inside Eclipse sucessfully ...
org.xtext.example.mydsl.parent\org.xtext.example.mydsl.tests\src\org\xtext\example\mydsl\tests\MyDslParsingTest.xtend

Package Explorer: Right Click > Run as > Junit Plug-In Test

However, if I run the Maven build it seems that no tests are run: mvn clean verify ...

[INFO] --- tycho-surefire:2.7.5:test (default-test) @ org.xtext.example.mydsl.tests ---
[INFO] Could not find a java toolchain of type jdk, using java from JAVA_HOME instead (C:\apps\jdk\openjdk11\bin\java.exe)
[INFO] Executing Test Runtime with timeout 0, logs (if any) will be placed at: C:\dev\eclipse-workspaces\xrm-dev\mydsl_2_33\org.xtext.example.mydsl\org.xtext.example.mydsl.parent\org.xtext.example.mydsl.tests\target\work\data\.metadata\.log
[INFO] Command line:
	[C:\apps\jdk\openjdk11\bin\java.exe, -Dosgi.noShutdown=false, -Dosgi.os=win32, -Dosgi.ws=win32, -Dosgi.arch=x86_64, --add-modules=ALL-SYSTEM, -Dosgi.clean=true, -jar, C:\Users\mira\.m2\repository\p2\osgi\bundle\org.eclipse.equinox.launcher\1.6.400.v20210924-0641\org.eclipse.equinox.launcher-1.6.400.v20210924-0641.jar, -data, C:\dev\eclipse-workspaces\xrm-dev\mydsl_2_33\org.xtext.example.mydsl\org.xtext.example.mydsl.parent\org.xtext.example.mydsl.tests\target\work\data, -install, C:\dev\eclipse-workspaces\xrm-dev\mydsl_2_33\org.xtext.example.mydsl\org.xtext.example.mydsl.parent\org.xtext.example.mydsl.tests\target\work, -configuration, C:\dev\eclipse-workspaces\xrm-dev\mydsl_2_33\org.xtext.example.mydsl\org.xtext.example.mydsl.parent\org.xtext.example.mydsl.tests\target\work\configuration, -application, org.eclipse.tycho.surefire.osgibooter.headlesstest, -testproperties, C:\dev\eclipse-workspaces\xrm-dev\mydsl_2_33\org.xtext.example.mydsl\org.xtext.example.mydsl.parent\org.xtext.example.mydsl.tests\target\surefire.properties]

Results:

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[WARNING] No tests found.

Now, if I modify MyDslParsingTest to have it failing, the maven build still succeeds. Is that behavior intentional ?

@cdietrich
Copy link
Member

cdietrich commented Dec 6, 2023

you need to select juniot4/5 accordingly. how is your project set up

@cdietrich
Copy link
Member

cdietrich commented Dec 6, 2023

tycho 2.7.5 is quite old too- maybe junit version detection not working properly.
as wil will ditch java 11 soon ...

=> patch is welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants