-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Beginning with 1.7.1 standalone console does not find tests on Java 8 #2600
Comments
Colleagues use a framework based on JUnit 5 with some enhancements needed for our project. In case they use JUnit 5.7.1 (jupiter) they also faced the same problem: tests were not discovered on Java8. |
Potentially related to junit-team/junit5-samples#146 |
Potentially caused by #2500 |
Metadata ( java -p jar-file-with-tests.jar --list-modules I get no modules for the testing project (possibly I should change that). |
Can you provide us that
|
SetupI could reproduce this bug using the following incredients/commands with JDK package sample;
class SampleTests { @org.junit.jupiter.api.Test void sample() {} }
✔ Expected Output
❌ Wrong Output
ConsoleLauncher 1.7.0
ConsoleLauncher 1.7.1
ConsoleLauncher 1.8.0-M1
|
@sormuras thank you for reproducing this issue! |
Fix `getRootUrisForPackage()` in class `ClasspathScanner` by looking for two "wordings" of a package name. For example, package `foo.bar` is expanded to `foo/bar` and `foo/bar/`. The latter allows find package `foo.bar` in a module called `foo.bar`, and not `foo`. Fixes #2500 Fixes #2600 Fixes #2612
Fix `getRootUrisForPackage()` in class `ClasspathScanner` by looking for two "wordings" of a package name. For example, package `foo.bar` is expanded to `foo/bar` and `foo/bar/`. The latter allows find package `foo.bar` in a module called `foo.bar`, and not `foo`. This commit also ensures, that there's no regression (compared to #2531) by launching test runs using the standalone artifact with `--select-package` and `--scan-class-path`. Fixes #2500 Fixes #2600 Fixes #2612
Fix `getRootUrisForPackage()` in class `ClasspathScanner` by looking for two "wordings" of a package name. For example, package `foo.bar` is expanded to `foo/bar` and `foo/bar/`. The latter allows find package `foo.bar` in a module called `foo.bar`, and not `foo`. This commit also ensures, that there's no regression (compared to #2531) by launching test runs using the standalone artifact with `--select-package` and `--scan-class-path`. Fixes #2500 Fixes #2600 Fixes #2612
Fix `getRootUrisForPackage()` in class `ClasspathScanner` by looking for two "wordings" of a package name. For example, package `foo.bar` is expanded to `foo/bar` and `foo/bar/`. The latter allows find package `foo.bar` in a module called `foo.bar`, and not `foo`. This commit also ensures, that there's no regression (compared to junit-team#2531) by launching test runs using the standalone artifact with `--select-package` and `--scan-class-path`. Fixes junit-team#2500 Fixes junit-team#2600 Fixes junit-team#2612
Steps to reproduce
We are launching tests with the following command:
jar-file-with-tests.jar
does contain a lot of classes with methods marked with@Test
annotation.This command works fine when:
junit-platform-console-standalone
version 1.7.0 both on Java 8 and Java 11junit-platform-console-standalone
version 1.7.1 or 1.8.0-M1 on Java 11When launching 1.7.1 console on Java 8 the report states that 2 containers were found (
2 containers found
,2 containers started
and2 containers successful
), no tests are present in the report (all other values in the report are 0 (like0 tests found
))Context
The testing project (
jar-file-with-tests.jar
) is built using Java 8.Issue seems to occur both in Windows and Linux environments.
The text was updated successfully, but these errors were encountered: