How does surefire 3.0.0-M5 run JPMS with junit5?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How does surefire 3.0.0-M5 run JPMS with junit5?

Alex Sviridov

Hi all,
 
I want to understand how surefire 3.0.0-M5 run JPMS with junit5. When I run my
tests on boot layer I see only two junit modules:
 
org.junit.jupiter.api
org.junit.platform.commons
 
And there is no platform, no engine. Besides "java.class.path" is empty. Could anyone
explain where is platform, engine etc.
 
--
Alex Orlov
Reply | Threaded
Open this post in threaded view
|

Re: How does surefire 3.0.0-M5 run JPMS with junit5?

Tibor Digana
Hi Alex,

This is the documentation regarding this topic
https://maven.apache.org/surefire/maven-surefire-plugin/examples/jpms.html
and you can see the links with the integration tests for TestNG, JUnit4 and
JUnit5.
These tests use JPMS in main and tests as well. You should be able to
access "org.junit" packages of course.
The class-path may be empty, or it contains only surefire libraries.

Try to copy the ITs and try to run "mvn test". It should work for you.

Cheers
T


On Fri, Jul 3, 2020 at 2:57 PM Alex Orlov <[hidden email]>
wrote:

>
> Hi all,
>
> I want to understand how surefire 3.0.0-M5 run JPMS with junit5. When I
> run my
> tests on boot layer I see only two junit modules:
>
> org.junit.jupiter.api
> org.junit.platform.commons
>
> And there is no platform, no engine. Besides "java.class.path" is empty.
> Could anyone
> explain where is platform, engine etc.
>
> --
> Alex Orlov
Reply | Threaded
Open this post in threaded view
|

Re[2]: How does surefire 3.0.0-M5 run JPMS with junit5?

Alex Sviridov

Hi Tibor,
 
Thank you for your answer. I’ve read the link you provided but didn’t find the
answer to my question. I don’t have any questions about how to run jpms tests.
I can’t understand how tests are executed without junit platform in boot layer.
As I understand we have the following chain:
maven → surefire → junit-platform-launcher → junit-platform-engine.
 
However, I can’t find maven, surefire, launcher, engine in boot layer. How
does it work? Could you explain what magic I miss?
 
Alex

>Пятница, 3 июля 2020, 17:40 +03:00 от Tibor Digana <[hidden email]>:

>Hi Alex,

>This is the documentation regarding this topic
>https://maven.apache.org/surefire/maven-surefire-plugin/examples/jpms.html
>and you can see the links with the integration tests for TestNG, JUnit4 and JUnit5.
>These tests use JPMS in main and tests as well. You should be able to access "org.junit" packages of course.
>The class-path may be empty, or it contains only surefire libraries.

>Try to copy the ITs and try to run "mvn test". It should work for you.

>Cheers
>T
>   
>On Fri, Jul 3, 2020 at 2:57 PM Alex Orlov < [hidden email] > wrote:

>>Hi all,
>> 
>>I want to understand how surefire 3.0.0-M5 run JPMS with junit5. When I run my
>>tests on boot layer I see only two junit modules:
>> 
>>org.junit.jupiter.api
>>org.junit.platform.commons
>> 
>>And there is no platform, no engine. Besides "java.class.path" is empty. Could anyone
>>explain where is platform, engine etc.
>> 
>>--
>>Alex Orlov
 
 
--
Alex Orlov
 
Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: How does surefire 3.0.0-M5 run JPMS with junit5?

Tibor Digana
I think you are talking about the issue
https://issues.apache.org/jira/browse/SUREFIRE-1809
See the last comment, the workaround is to set
<useModulePath>false</useModulePath> in plugin config.
Of course this is a temporal workaround.

I have understood the title of the message as you are a fan of JPMS.
T



On Fri, Jul 3, 2020 at 5:41 PM Alex Orlov <[hidden email]> wrote:

> Hi Tibor,
>
> Thank you for your answer. I’ve read the link you provided but didn’t find
> the
> answer to my question. I don’t have any questions about how to run jpms
> tests.
> I can’t understand how tests are executed without junit platform in boot
> layer.
> As I understand we have the following chain:
> maven → surefire → junit-platform-launcher → junit-platform-engine.
>
> However, I can’t find maven, surefire, launcher, engine in boot layer. How
> does it work? Could you explain what magic I miss?
>
> Alex
>
> Пятница, 3 июля 2020, 17:40 +03:00 от Tibor Digana <[hidden email]
> >:
>
> Hi Alex,
>
> This is the documentation regarding this topic
> https://maven.apache.org/surefire/maven-surefire-plugin/examples/jpms.html
> and you can see the links with the integration tests for TestNG, JUnit4
> and JUnit5.
> These tests use JPMS in main and tests as well. You should be able to
> access "org.junit" packages of course.
> The class-path may be empty, or it contains only surefire libraries.
>
> Try to copy the ITs and try to run "mvn test". It should work for you.
>
> Cheers
> T
>
>
> On Fri, Jul 3, 2020 at 2:57 PM Alex Orlov <[hidden email]
> <http:///compose?To=ooo_saturn7@...>> wrote:
>
>
> Hi all,
>
> I want to understand how surefire 3.0.0-M5 run JPMS with junit5. When I
> run my
> tests on boot layer I see only two junit modules:
>
> org.junit.jupiter.api
> org.junit.platform.commons
>
> And there is no platform, no engine. Besides "java.class.path" is empty.
> Could anyone
> explain where is platform, engine etc.
>
> --
> Alex Orlov
>
>
>
> --
> Alex Orlov
>
>