Bug 568870 - Module based app. No tests found with test runner 'JUnit 5'
Summary: Module based app. No tests found with test runner 'JUnit 5'
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2020-11-16 22:50 EST by David Ryan CLA
Modified: 2022-11-15 16:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Ryan CLA 2020-11-16 22:50:33 EST
I have two projects with one module defined in the first project and a second module in the second. The second module contains the unit tests.

Selecting an individual class and running JUnit test correct executes the test. However, selecting the package and running the test results in the error "No tests found with test runner 'JUnit 5'". The console shows no output and the eclipse log file shows no errors.

The project was created using Gradle 6.7. 

The command line for a single class that was successful is:

C:\Program Files\AdoptOpenJDK\jdk-11.0.9.11-hotspot\bin\javaw.exe -ea --add-opens io.litterat.pep.test/io.litterat.pep.test=org.junit.platform.commons,ALL-UNNAMED --add-modules=ALL-MODULE-PATH -Dfile.encoding=Cp1252 -p "C:\projects\litterat\litterat-pep-test\bin\main;C:\projects\litterat\litterat-pep\bin\main;C:\Users\user\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-tree\8.0.1\dfcad5abbcff36f8bdad5647fe6f4972e958ad59\asm-tree-8.0.1.jar;C:\Users\user\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\8.0.1\3f5199523fb95304b44563f5d56d9f5a07270669\asm-8.0.1.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.api_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.engine_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.migrationsupport_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.params_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.commons_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.engine_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.launcher_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.runner_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.suite.api_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.vintage.engine_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.opentest4j_1.2.0.v20190826-0900.jar;C:\Users\user\.p2\pool\plugins\org.apiguardian_1.1.0.v20190826-0900.jar;C:\Users\user\.p2\pool\plugins\org.junit_4.13.0.v20200204-1500.jar;C:\Users\user\.p2\pool\plugins\org.hamcrest.core_1.3.0.v20180420-1519.jar" -classpath "C:\Users\user\eclipse\java-2020-09\eclipse\configuration\org.eclipse.osgi\214\0\.cp;C:\Users\user\eclipse\java-2020-09\eclipse\configuration\org.eclipse.osgi\212\0\.cp;C:\Users\user\eclipse\java-2020-09\eclipse\configuration\org.eclipse.osgi\411\0\.cp" --patch-module "io.litterat.pep.test=C:\projects\litterat\litterat-pep-test\bin\test;C:\projects\litterat\litterat-pep-test\bin\default" --patch-module "io.litterat.pep=C:\projects\litterat\litterat-pep\bin\default" --add-reads io.litterat.pep=ALL-UNNAMED org.eclipse.jdt.internal.junit.runner.RemoteTestRunner -version 3 -port 63334 -testLoaderClass org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader -loaderpluginname org.eclipse.jdt.junit5.runtime -classNames io.litterat.pep.test.IntAtomTest

And the unsuccessful command line is as follows.

C:\Program Files\AdoptOpenJDK\jdk-11.0.9.11-hotspot\bin\javaw.exe -ea --add-opens io.litterat.pep.test/io.litterat.pep.test=org.junit.platform.commons,ALL-UNNAMED --add-modules=ALL-MODULE-PATH -Dfile.encoding=Cp1252 -p "C:\projects\litterat\litterat-pep-test\bin\main;C:\projects\litterat\litterat-pep\bin\main;C:\Users\user\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-tree\8.0.1\dfcad5abbcff36f8bdad5647fe6f4972e958ad59\asm-tree-8.0.1.jar;C:\Users\user\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\8.0.1\3f5199523fb95304b44563f5d56d9f5a07270669\asm-8.0.1.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.api_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.engine_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.migrationsupport_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.jupiter.params_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.commons_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.engine_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.launcher_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.runner_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.platform.suite.api_1.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.junit.vintage.engine_5.6.0.v20200203-2009.jar;C:\Users\user\.p2\pool\plugins\org.opentest4j_1.2.0.v20190826-0900.jar;C:\Users\user\.p2\pool\plugins\org.apiguardian_1.1.0.v20190826-0900.jar;C:\Users\user\.p2\pool\plugins\org.junit_4.13.0.v20200204-1500.jar;C:\Users\user\.p2\pool\plugins\org.hamcrest.core_1.3.0.v20180420-1519.jar" -classpath "C:\Users\user\eclipse\java-2020-09\eclipse\configuration\org.eclipse.osgi\214\0\.cp;C:\Users\user\eclipse\java-2020-09\eclipse\configuration\org.eclipse.osgi\212\0\.cp;C:\Users\user\eclipse\java-2020-09\eclipse\configuration\org.eclipse.osgi\411\0\.cp" --patch-module "io.litterat.pep.test=C:\projects\litterat\litterat-pep-test\bin\test;C:\projects\litterat\litterat-pep-test\bin\default" --patch-module "io.litterat.pep=C:\projects\litterat\litterat-pep\bin\default" --add-reads io.litterat.pep=ALL-UNNAMED org.eclipse.jdt.internal.junit.runner.RemoteTestRunner -version 3 -port 63348 -testLoaderClass org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader -loaderpluginname org.eclipse.jdt.junit5.runtime -packageNameFile "C:\Users\user\AppData\Local\Temp\packageNames6693398788885026841.txt"

Not sure what other information I can gather to assist in fixing this?
Comment 1 Noopur Gupta CLA 2020-11-17 01:42:22 EST
Please attach sample projects to reproduce the issue.
Comment 2 Eclipse Genie CLA 2022-11-15 16:46:32 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.