[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-04-02 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17516382#comment-17516382
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

If the {{junit-platform-runner}} is a compile time dependency of the project, 
it cannot be deleted from the POM.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-04-02 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17516363#comment-17516363
 ] 

Tibor Digana commented on SUREFIRE-2033:


If previous versions executed junit5 tests without platform-runner's annotation 
then it means that the {{junit-platform-runner}} can be freely deleted in POM 
dependencies.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-04-02 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17516340#comment-17516340
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

Of course my test does not have a `@RunWith` annotation: It's a JUnit 5 test. 
It's a perfectly good JUnit 5 test that used to be run by Surefire 3.0.0-M1, 
3.0.0-M2, 3.0.0-M3, and 3.0.0-M4. The `@RunWith` annotation was never necessary 
before, as Surefire used to run the JUnit 5 test directly using the JUnit 5 
Engine because Surefire, as is stil documented, preferred to use the JUnit 5 
engine if present.

Surefire 3.0.0-M5 regresses because it newly special cases the 
`junit-platform-runner` and so ignores the perfectly good test.

You keep trying to tell me how `junit-platform-runner` should be used, and that 
I should delete it from my project. Again I must point out that this is simply 
not an option: I do understand `junit-platform-runner` well already as my 
project uses it as a compile time dependency which therefore must be present. 
The tests of my project exclusively use JUnit 5 and so we have a 
`junit-jupiter-engine` test dependency, which always used to be a perfectly 
good configuration because Surefire would find multiple engines and pick the 
best available - with JUnit 5 being preferred over all others. As of 3.0.0-M5, 
`junit-platform-runner` is preferred over all others instead, and results in no 
tests being run in the example and in my real project. In both the attached 
example and my real project, this new behaviour is a clear regressive step.

For 3.0.0-M5 to actively change the priorities and actively optimise for users 
who are transitioning from JUnit 4 to 5, at the cost of those that have already 
completed the transition seems crazy to me.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-04-02 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17516316#comment-17516316
 ] 

Tibor Digana commented on SUREFIRE-2033:


[~roxspring]
You example attached in {{example.zip}} does not contain the annotation
{code:java}
@RunWith 
{code}
So there is no adapter from JUnit4 Runner to Junit5 tests and nothing to run of 
course.
You example would execute all junit4 unit tests if you wrote them and it would 
additionally tun junit5 tests if you used the adapter.
Specifying two surefire providers, i.e. for junit4 and platform, in plugin 
dependencies would not make sense with {{junit-platform-runner}} either. So, 
since you use {{junit-platform-runner}}, you should remember that still junit4 
provider is activated but the you have to use @ RunWith and all the staff 
around in order to adapt junit4 runner/provider to junit5 tests. This is the 
purpose of {{junit-platform-runner}} in my understaning and it is used for 
migration from junit4 to junit5, but final is final after all the classes are 
migrated and then {{junit-platform-runner}} has to be deleted. This is I think 
the main business purpose of {{junit-platform-runner}}.


> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-04-01 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17516168#comment-17516168
 ] 

Tibor Digana commented on SUREFIRE-2033:


[~roxspring]
The 
[documentation|https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html#JUnit_Runner]
 describes the POM configuration for JUnit Runner. Does it mean that JUnit5 
provider has to be activated? The user experiences is his JUnit5 tests and he 
does not necessarily can see what is under the hood. His main focus is his 
junit5/platform tests but the junit4 starter/suite is just a small tiny layer. 
He can mix junit4 and half-migrated junit5 tests with this approach of course 
but the user is moving his junit4 test to the junit5 test which is his target 
what he is aiming for.

The {{junit-platform-runner}} is JUnit4 specific. It is JUnit4 runner, so the 
{{surefire-junit4}} provider should be activated.
It means that the ProviderInfo.isApplicable() must return false for 
JUnitPlatformProviderInfo, and so the JUnit4 provider should be activated. This 
was the previous design of code and it still has the same meaning even after 
your PR which is right IMHO.


> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-19 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17509354#comment-17509354
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

The documentation is also very clear about the precedence algorithm used to 
choose the engine/runner to use:

[https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html]

If nothing is configured, Surefire detects which JUnit version to use by the 
following algorithm:
  # if the JUnit 5 Platform Engine is present in the project
 # use junit-platform
 # if the JUnit version in the project >= 4.7 and the <<>> 
configuration parameter has ANY value
 # use junit47 provider
 # if JUnit >= 4.0 is present
 # use junit4 provider
 # else
 # use junit3.8.1
Prior to M5, surefire worked as documented and actively preferred to use JUnit 
5 if the engine is present. Since M5, switches away from this documented 
behaviour and conditionally prefers to run the older junit-platform-runner, if 
present, effectively preferring JUnit 4.

As discussed previously, we have a business requirement for our product to use 
junit-platform-runner, but tests of our product are using JUnit 5 and have been 
run via the junit-Jupiter-engine for as long as I can remember. You may find 
this a silly requirement, and I’d love to change it, but that is what the 
business requires.

Your main concern seems to be that use of junit-platform-runner is unusual and 
not a recommended configuration. Given this, doesn’t it seem odd that M5 
changes behaviour to actively prefer this unusual unrecommended runner over the 
Junit Jupiter Engine that is also present?

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-19 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17509342#comment-17509342
 ] 

Tibor Digana commented on SUREFIRE-2033:


[~sjaranowski]
[~roxspring]
The documentation exists very long time. 
https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html
The Surefire is very intelligent because it downloads and uses Vintage and 
Jupiter engines even if you do not specify them in the project dependencies. 
It's enough to use API, e.g. org.junit.jupiter:junit-jupiter-api or 
junit:junit:4.13.2.
Let's go back to the problem with {{junit-platform-runner}}. In reality 
{{junit-platform-runner}} is an adapter from JUnit4 to JUnit5. It is not reach 
JUnit5 runner. In the Maven perspective it can be used only if you hard code 
{{surefire-junit4}} provider under the plugin in its dependencies but your 
project contains dependencies for JUnit5 tests.

So the key point of {{junit-platform-runner}} is to have JUnit4 executor 
(junit4 surefire provider in our case) and JUnit5 tests. This is very silly due 
to use can use {{surefire-junit-platform}} provider instead of JUnit4 executor 
and you can avoid using {{junit-platform-runner}}. It is silly to use 
{{junit-platform-runner}} unless you have a strong resources/financial reason 
to spending the time when rewriting JUnit4 Suites to JUnit5 Suites.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-12 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17505304#comment-17505304
 ] 

Slawomir Jaranowski commented on SUREFIRE-2033:
---

Surefire code for detecting providers is too complicated for my. IMHO Surefire 
should only detect simple cases .. when we want to make happy everyone and 
cover all cases we will have such issue everytime and for every new release 

So we should have good and clear documentation for automatic providers 
detection with instruction how to solve special corner cases by configuration.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-12 Thread Dan Tran (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17505302#comment-17505302
 ] 

Dan Tran commented on SUREFIRE-2033:


I do agree with [~roxspring] this is a regression compared with M4.  with M6, i 
now have to manually add provider ( in my case testing, junit4, junit5) to 
surefire plugin's dependencies

In M4 it works out of the box [1]

https://maven.apache.org/surefire/maven-surefire-plugin/examples/providers.html

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-08 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17502867#comment-17502867
 ] 

Slawomir Jaranowski commented on SUREFIRE-2033:
---

[~roxspring] - thanks for PR

For next release note to be clean and show what we delivered I propose to 
create new issue for resolving NPE when junit platform is manually selected 
with platform-runner on dependency.

Or simple change title of current issue to show what we do :-)

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-08 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17502855#comment-17502855
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

Fix for the NullPointerException: 
https://github.com/apache/maven-surefire/pull/485

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-08 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17502813#comment-17502813
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

... and that blows up with a {{NullPointerException}} at the moment. I have a 
fix for that though, will open a PR shortly.

We have a product that works with JUnit tests and needs to run them. Our 
customers use a variety of JUnit 4-5 versions and so we use 
junit-platform-runner to run them. But the tests _of_ our product primarily use 
JUnit 5. We want to upgrade to Surefire 3.0.0-M5 to take advantage of 
SUREFIRE-1797 but are currently blocked because Surefire is chosing the wrong 
runner.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-07 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17502770#comment-17502770
 ] 

Slawomir Jaranowski commented on SUREFIRE-2033:
---

You can manually select provider by add dependency to plugin:

{code}

org.apache.maven.plugins
maven-surefire-plugin
3.0.0-M5

  
org.apache.maven.surefire
surefire-junit-platform
3.0.0-M5
  

  
{code}

But it is very interesting situation that you need {{junit-platform-runner}} 
and want to run tests by {{Junit5}} platform - what for is 
{{junit-platform-runner}}?

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This 

[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-07 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17502625#comment-17502625
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

No, {{junit-platform-runner}} is an intended actual dependency of the project 
and cannot be removed. Prior to M5, this caused Surefire no problem whatsoever.

If there's something that can be added to the pom to force the use of JUnit 5 
then I'd take that as a workaround, but removing dependencies is just not 
possible.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-07 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17502571#comment-17502571
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

What do I have to add to this pom.xml file in order to have JUnit 5 tests run 
again?

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-04 Thread Robert James Oxspring (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17501534#comment-17501534
 ] 

Robert James Oxspring commented on SUREFIRE-2033:
-

And yet the result is that in this configuration it fails to run the test at 
all - not via JUnit4 or JUnit 5. This behaviour in M5 is entirely regressive.

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-2033) Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4

2022-03-03 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17500625#comment-17500625
 ] 

Slawomir Jaranowski commented on SUREFIRE-2033:
---

It is proper behavior in M5
If you have on dependencies list {{junit-platform-runner}}, surefire assume 
that you want to run {{Junit5}} test by {{Junit4}} framework.

https://junit.org/junit5/docs/current/user-guide/#running-tests-junit-platform-runner

> Regression: 3.0.0-M5 misidentifies JUnit 5 configuration as JUnit 4
> ---
>
> Key: SUREFIRE-2033
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2033
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.0.0-M5
>Reporter: Robert James Oxspring
>Priority: Major
> Attachments: example.zip
>
>
> 3.0.0-M5 misidentifies a clearly JUnit 5 configuration and attempts to run 
> using JUnit 4.
> In particular the attached project only has JUnit 5 dependencies:
> {code:java}
> 
> 
> org.junit.jupiter
> junit-jupiter-engine
> 5.6.2
> test
> 
> 
> org.junit.platform
> junit-platform-runner
> 1.6.2
> test
> 
> {code}
> and a JUnit 5 test:
> {code:java}
> package pkg;
> import org.junit.jupiter.api.Test;
> class JUnit5Test {
> @Test
> public void test() {
> }
> }{code}
> When the project is run with with older version (as far back as 2.22.0) the 
> test is found and run, but 3.0.0-M5 fails to run any test:
> {code:java}
> % mvn test -Dsurefire.version=2.22.0 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.337 s
> [INFO] Finished at: 2022-03-03T09:42:27Z
> [INFO] 
>  
> {code}
>  
> {code:java}
> % mvn test -Dsurefire.version=3.0.0-M1 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.708 s
> [INFO] Finished at: 2022-03-03T09:34:58Z
> [INFO] 
>  
> % mvn test -Dsurefire.version=3.0.0-M2 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.701 s
> [INFO] Finished at: 2022-03-03T09:36:26Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M3 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.612 s
> [INFO] Finished at: 2022-03-03T09:37:02Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M4 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.619 s
> [INFO] Finished at: 2022-03-03T09:37:37Z
> [INFO] 
> 
> % mvn test -Dsurefire.version=3.0.0-M5 | tail
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  1.344 s
> [INFO] Finished at: 2022-03-03T09:38:01Z
> [INFO] 
> {code}
> Note the final run above using 3.0.0-M5 and logging: {{Tests run: 0}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)