Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread Tibor Digana
David, for you the most important value is to see the POM of the IT.
I guess you have the dependencies, configuration with the  framework
we have in the IT.
We have one successful test which is the test behind the suite, we have
verified what test and suite and provider run.

T

On Mon, Mar 21, 2022 at 12:52 AM KARR, DAVID  wrote:

> I think I'll have to take your word for it.  I don’t know anything about
> your build or runtime architecture to comment.  I only found one change
> that looked like an actual business logic change, relating to adding the
> wildcard filter to the TestListResolver, but I don't know what that means.
> I'll be glad to test it when it's put into a released version.
>
> Is there any thought as to when this will go into a full release, instead
> of M releases?
>
> > -Original Message-
> > From: Tibor Digana 
> > Sent: Sunday, March 20, 2022 4:32 PM
> > To: Maven Users List 
> > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> >
> > The principles in junit providers are +/- the same, or they should be.
> > So it was easy to find the difference and make the fix!
> >
> > T
> >
> > On Mon, Mar 21, 2022 at 12:25 AM Tibor Digana 
> > wrote:
> >
> > > Hey David,
> > >
> > > Here is the PR.
> > > You can see the integration test of documentation with the principles.
> > > Pls find it and let me know you like it, feel free to put +1 in your
> > comment.
> > > https://urldefense.com/v3/__https://github.com/apache/maven-surefire/p
> > > ull/494__;!!BhdT!lFqcUUy0111TgmVTkjtCGYx0nVsQnYDTocJ9YXlK-lioUt5rbtuGB
> > > _V1sLb284E5LAqrLQkEGXLu3FQAemKi$ As I said in JIRA, the combination of
> > > JUnit4 and JUnit5 is not the problem. The problem is that we
> > > implemented the JUnit5 Surefire Provider with a bug. We always operate
> > > with TestListResolver the same way in all surefire providers but in
> > > this one. It was our fault, and not the principals are the same in
> > > providers and so there is no difference regarding the principles.
> > > That's the reason why I showed you the example with JUnit4 because I
> > > had some suspicions in the code and it was confirmed by running the
> > > tests and debugging the code.
> > >
> > > Cheers
> > > Tibor
> > >
> > >
> > > On Sun, Mar 20, 2022 at 8:23 PM KARR, DAVID  wrote:
> > >
> > >> Here's my ticket:
> > https://urldefense.com/v3/__https://issues.apache.org/jira/browse/SUREFI
> > RE-2040__;!!BhdT!lFqcUUy0111TgmVTkjtCGYx0nVsQnYDTocJ9YXlK-
> > lioUt5rbtuGB_V1sLb284E5LAqrLQkEGXLu3BaYyUTU$  .
> > >>
> > >> > -Original Message-
> > >> > From: Tibor Digana 
> > >> > Sent: Sunday, March 20, 2022 12:03 PM
> > >> > To: Maven Users List 
> > >> > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> > >> >
> > >> > Hello David,
> > >> >
> > >> > I have an internal fix, zou won't be able to have it today. :-) But
> > >> > if you have created the Jira ticket for us, we would make sure we
> > >> > are on the right way.
> > >> >
> > >> > This is my suite class with JUnit5, just a principle (there might
> > >> > be more children classes of course), and I use the command *mvn
> > >> > test -
> > >> > Dtest=MyTestSuite* I hope I am on the right track.
> > >> >
> > >> > package pkg;
> > >> >
> > >> > import org.junit.platform.suite.api.SelectClasses;
> > >> > import org.junit.platform.suite.api.Suite;
> > >> >
> > >> > @Suite
> > >> > @SelectClasses(BDSHelperTest.class)
> > >> > public class MyTestSuite {
> > >> > }
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > On Sun, Mar 20, 2022 at 6:25 PM KARR, DAVID  wrote:
> > >> >
> > >> > > > -Original Message-
> > >> > > > From: Tibor Digana 
> > >> > > > Sent: Sunday, March 20, 2022 6:42 AM
> > >> > > > To: Maven Users List 
> > >> > > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> > >> > > >
> > >> > > > There was the same question maybe one week ago.
> > >> > > > I have created an example with JUnit4, see the next, and used
> > >> > > > the configuration parameter ComponentTestSuite
> > >> > > > where the command naturally works:
> > >> > > >
> > >> > > > mvn -Dtest=ComponentTestSuite test
> > >> > > >
> > >> > > > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
> > >> > elapsed:
> > >> > > > 0.14 s - in pkg.ComponentTestSuite
> > >> > > >
> > >> > > > After my fix this should work in JUnit5 provider. I have pushed
> > >> > > > a test project with JUnit5 Suite, activate it via profile
> > >> > > > "suite", see
> > >> > > >
> > >> https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockit
> > >> > > > o-
> > >> > > > examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!Bh
> > >> > > > dT!i5
> > >> > > > Qv7K
> > >> > > > rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > >> > > > _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
> > >> > > >
> > >> > > > If there is a Jira ticket pls let me know and I will open a PR
> > >> > > > on our GH.
> > >> > >
> > >> > > Thanks for the variations, I only care about the solution that
> > >> > > moves 

RE: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread KARR, DAVID
I think I'll have to take your word for it.  I don’t know anything about your 
build or runtime architecture to comment.  I only found one change that looked 
like an actual business logic change, relating to adding the wildcard filter to 
the TestListResolver, but I don't know what that means.  I'll be glad to test 
it when it's put into a released version.

Is there any thought as to when this will go into a full release, instead of M 
releases?

> -Original Message-
> From: Tibor Digana 
> Sent: Sunday, March 20, 2022 4:32 PM
> To: Maven Users List 
> Subject: Re: Can't get Surefire to run any JUnit 5 tests
> 
> The principles in junit providers are +/- the same, or they should be.
> So it was easy to find the difference and make the fix!
> 
> T
> 
> On Mon, Mar 21, 2022 at 12:25 AM Tibor Digana 
> wrote:
> 
> > Hey David,
> >
> > Here is the PR.
> > You can see the integration test of documentation with the principles.
> > Pls find it and let me know you like it, feel free to put +1 in your
> comment.
> > https://urldefense.com/v3/__https://github.com/apache/maven-surefire/p
> > ull/494__;!!BhdT!lFqcUUy0111TgmVTkjtCGYx0nVsQnYDTocJ9YXlK-lioUt5rbtuGB
> > _V1sLb284E5LAqrLQkEGXLu3FQAemKi$ As I said in JIRA, the combination of
> > JUnit4 and JUnit5 is not the problem. The problem is that we
> > implemented the JUnit5 Surefire Provider with a bug. We always operate
> > with TestListResolver the same way in all surefire providers but in
> > this one. It was our fault, and not the principals are the same in
> > providers and so there is no difference regarding the principles.
> > That's the reason why I showed you the example with JUnit4 because I
> > had some suspicions in the code and it was confirmed by running the
> > tests and debugging the code.
> >
> > Cheers
> > Tibor
> >
> >
> > On Sun, Mar 20, 2022 at 8:23 PM KARR, DAVID  wrote:
> >
> >> Here's my ticket:
> https://urldefense.com/v3/__https://issues.apache.org/jira/browse/SUREFI
> RE-2040__;!!BhdT!lFqcUUy0111TgmVTkjtCGYx0nVsQnYDTocJ9YXlK-
> lioUt5rbtuGB_V1sLb284E5LAqrLQkEGXLu3BaYyUTU$  .
> >>
> >> > -Original Message-
> >> > From: Tibor Digana 
> >> > Sent: Sunday, March 20, 2022 12:03 PM
> >> > To: Maven Users List 
> >> > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> >> >
> >> > Hello David,
> >> >
> >> > I have an internal fix, zou won't be able to have it today. :-) But
> >> > if you have created the Jira ticket for us, we would make sure we
> >> > are on the right way.
> >> >
> >> > This is my suite class with JUnit5, just a principle (there might
> >> > be more children classes of course), and I use the command *mvn
> >> > test -
> >> > Dtest=MyTestSuite* I hope I am on the right track.
> >> >
> >> > package pkg;
> >> >
> >> > import org.junit.platform.suite.api.SelectClasses;
> >> > import org.junit.platform.suite.api.Suite;
> >> >
> >> > @Suite
> >> > @SelectClasses(BDSHelperTest.class)
> >> > public class MyTestSuite {
> >> > }
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On Sun, Mar 20, 2022 at 6:25 PM KARR, DAVID  wrote:
> >> >
> >> > > > -Original Message-
> >> > > > From: Tibor Digana 
> >> > > > Sent: Sunday, March 20, 2022 6:42 AM
> >> > > > To: Maven Users List 
> >> > > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> >> > > >
> >> > > > There was the same question maybe one week ago.
> >> > > > I have created an example with JUnit4, see the next, and used
> >> > > > the configuration parameter ComponentTestSuite
> >> > > > where the command naturally works:
> >> > > >
> >> > > > mvn -Dtest=ComponentTestSuite test
> >> > > >
> >> > > > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
> >> > elapsed:
> >> > > > 0.14 s - in pkg.ComponentTestSuite
> >> > > >
> >> > > > After my fix this should work in JUnit5 provider. I have pushed
> >> > > > a test project with JUnit5 Suite, activate it via profile
> >> > > > "suite", see
> >> > > >
> >> https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockit
> >> > > > o-
> >> > > > examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!Bh
> >> > > > dT!i5
> >> > > > Qv7K
> >> > > > rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> >> > > > _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
> >> > > >
> >> > > > If there is a Jira ticket pls let me know and I will open a PR
> >> > > > on our GH.
> >> > >
> >> > > Thanks for the variations, I only care about the solution that
> >> > > moves forward with Junit5.
> >> > >
> >> > > You refer to a fix.  Is that something you've put into version
> >> > > 3.0.0-M6-SNAPSHOT that I would need for this to work?  I am
> >> > > attempting to get that version, but I'm having trouble
> >> > > configuring my settings.xml to get this to retrieve from the
> >> > > public repo. We engineer things so that all artifacts are
> >> > > retrieved from our internal artifact repository, which mirrors
> >> > > the public one.  If I need to, I will continue trying to figure
> that out.
> >> > >
> >> > > I have a 

Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread Tibor Digana
The principles in junit providers are +/- the same, or they should be. So
it was easy to find the difference and make the fix!

T

On Mon, Mar 21, 2022 at 12:25 AM Tibor Digana 
wrote:

> Hey David,
>
> Here is the PR.
> You can see the integration test of documentation with the principles. Pls
> find it and let me know you like it, feel free to put +1 in your comment.
> https://github.com/apache/maven-surefire/pull/494
> As I said in JIRA, the combination of JUnit4 and JUnit5 is not the
> problem. The problem is that we implemented the JUnit5 Surefire Provider
> with a bug. We always operate with TestListResolver the same way in all
> surefire providers but in this one. It was our fault, and not the
> principals are the same in providers and so there is no difference
> regarding the principles. That's the reason why I showed you the example
> with JUnit4 because I had some suspicions in the code and it was confirmed
> by running the tests and debugging the code.
>
> Cheers
> Tibor
>
>
> On Sun, Mar 20, 2022 at 8:23 PM KARR, DAVID  wrote:
>
>> Here's my ticket: https://issues.apache.org/jira/browse/SUREFIRE-2040 .
>>
>> > -Original Message-
>> > From: Tibor Digana 
>> > Sent: Sunday, March 20, 2022 12:03 PM
>> > To: Maven Users List 
>> > Subject: Re: Can't get Surefire to run any JUnit 5 tests
>> >
>> > Hello David,
>> >
>> > I have an internal fix, zou won't be able to have it today. :-) But if
>> > you have created the Jira ticket for us, we would make sure we are on
>> > the right way.
>> >
>> > This is my suite class with JUnit5, just a principle (there might be
>> > more children classes of course), and I use the command *mvn test -
>> > Dtest=MyTestSuite* I hope I am on the right track.
>> >
>> > package pkg;
>> >
>> > import org.junit.platform.suite.api.SelectClasses;
>> > import org.junit.platform.suite.api.Suite;
>> >
>> > @Suite
>> > @SelectClasses(BDSHelperTest.class)
>> > public class MyTestSuite {
>> > }
>> >
>> >
>> >
>> >
>> >
>> > On Sun, Mar 20, 2022 at 6:25 PM KARR, DAVID  wrote:
>> >
>> > > > -Original Message-
>> > > > From: Tibor Digana 
>> > > > Sent: Sunday, March 20, 2022 6:42 AM
>> > > > To: Maven Users List 
>> > > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
>> > > >
>> > > > There was the same question maybe one week ago.
>> > > > I have created an example with JUnit4, see the next, and used the
>> > > > configuration parameter ComponentTestSuite where the
>> > > > command naturally works:
>> > > >
>> > > > mvn -Dtest=ComponentTestSuite test
>> > > >
>> > > > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
>> > elapsed:
>> > > > 0.14 s - in pkg.ComponentTestSuite
>> > > >
>> > > > After my fix this should work in JUnit5 provider. I have pushed a
>> > > > test project with JUnit5 Suite, activate it via profile "suite", see
>> > > >
>> https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockit
>> > > > o-
>> > > > examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!BhdT!i5
>> > > > Qv7K
>> > > > rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
>> > > > _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
>> > > >
>> > > > If there is a Jira ticket pls let me know and I will open a PR on
>> > > > our GH.
>> > >
>> > > Thanks for the variations, I only care about the solution that moves
>> > > forward with Junit5.
>> > >
>> > > You refer to a fix.  Is that something you've put into version
>> > > 3.0.0-M6-SNAPSHOT that I would need for this to work?  I am attempting
>> > > to get that version, but I'm having trouble configuring my
>> > > settings.xml to get this to retrieve from the public repo. We engineer
>> > > things so that all artifacts are retrieved from our internal artifact
>> > > repository, which mirrors the public one.  If I need to, I will
>> > > continue trying to figure that out.
>> > >
>> > > I have a feeling you're saying that with Junit5, you were unable to
>> > > get to the point where you could specify a single test, being a test
>> > > suite, on the command line, which I believe is why you asked if there
>> > > is a JIRA ticket for this.  If you confirm that, I will create that
>> > ticket.
>> > >
>> > > I see what you're doing with profiles.  For what we're trying to do
>> > > here, I can see that this could at least be a functional 1-1
>> > > replacement for specifying a single test on the command line, but I'd
>> > > prefer not having to change how we do this, if possible.
>> > >
>> > > > On Sun, Mar 20, 2022 at 1:46 AM David Karr
>> > > > 
>> > > > wrote:
>> > > >
>> > > > > On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana
>> > > > > 
>> > > > > wrote:
>> > > > >
>> > > > > > My advice is not to listen to everyone but rather understand how
>> > > > > > things work.
>> > > > > > Open this link in your browser
>> > > > > >
>> https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/j
>> > > > > > unit
>> > > > > > /platform/__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBu
>> > > > > > Q2Td 

Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread Tibor Digana
Hey David,

Here is the PR.
You can see the integration test of documentation with the principles. Pls
find it and let me know you like it, feel free to put +1 in your comment.
https://github.com/apache/maven-surefire/pull/494
As I said in JIRA, the combination of JUnit4 and JUnit5 is not the problem.
The problem is that we implemented the JUnit5 Surefire Provider with a bug.
We always operate with TestListResolver the same way in all surefire
providers but in this one. It was our fault, and not the principals are the
same in providers and so there is no difference regarding the principles.
That's the reason why I showed you the example with JUnit4 because I had
some suspicions in the code and it was confirmed by running the tests and
debugging the code.

Cheers
Tibor


On Sun, Mar 20, 2022 at 8:23 PM KARR, DAVID  wrote:

> Here's my ticket: https://issues.apache.org/jira/browse/SUREFIRE-2040 .
>
> > -Original Message-
> > From: Tibor Digana 
> > Sent: Sunday, March 20, 2022 12:03 PM
> > To: Maven Users List 
> > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> >
> > Hello David,
> >
> > I have an internal fix, zou won't be able to have it today. :-) But if
> > you have created the Jira ticket for us, we would make sure we are on
> > the right way.
> >
> > This is my suite class with JUnit5, just a principle (there might be
> > more children classes of course), and I use the command *mvn test -
> > Dtest=MyTestSuite* I hope I am on the right track.
> >
> > package pkg;
> >
> > import org.junit.platform.suite.api.SelectClasses;
> > import org.junit.platform.suite.api.Suite;
> >
> > @Suite
> > @SelectClasses(BDSHelperTest.class)
> > public class MyTestSuite {
> > }
> >
> >
> >
> >
> >
> > On Sun, Mar 20, 2022 at 6:25 PM KARR, DAVID  wrote:
> >
> > > > -Original Message-
> > > > From: Tibor Digana 
> > > > Sent: Sunday, March 20, 2022 6:42 AM
> > > > To: Maven Users List 
> > > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> > > >
> > > > There was the same question maybe one week ago.
> > > > I have created an example with JUnit4, see the next, and used the
> > > > configuration parameter ComponentTestSuite where the
> > > > command naturally works:
> > > >
> > > > mvn -Dtest=ComponentTestSuite test
> > > >
> > > > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
> > elapsed:
> > > > 0.14 s - in pkg.ComponentTestSuite
> > > >
> > > > After my fix this should work in JUnit5 provider. I have pushed a
> > > > test project with JUnit5 Suite, activate it via profile "suite", see
> > > > https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockit
> > > > o-
> > > > examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!BhdT!i5
> > > > Qv7K
> > > > rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > > > _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
> > > >
> > > > If there is a Jira ticket pls let me know and I will open a PR on
> > > > our GH.
> > >
> > > Thanks for the variations, I only care about the solution that moves
> > > forward with Junit5.
> > >
> > > You refer to a fix.  Is that something you've put into version
> > > 3.0.0-M6-SNAPSHOT that I would need for this to work?  I am attempting
> > > to get that version, but I'm having trouble configuring my
> > > settings.xml to get this to retrieve from the public repo. We engineer
> > > things so that all artifacts are retrieved from our internal artifact
> > > repository, which mirrors the public one.  If I need to, I will
> > > continue trying to figure that out.
> > >
> > > I have a feeling you're saying that with Junit5, you were unable to
> > > get to the point where you could specify a single test, being a test
> > > suite, on the command line, which I believe is why you asked if there
> > > is a JIRA ticket for this.  If you confirm that, I will create that
> > ticket.
> > >
> > > I see what you're doing with profiles.  For what we're trying to do
> > > here, I can see that this could at least be a functional 1-1
> > > replacement for specifying a single test on the command line, but I'd
> > > prefer not having to change how we do this, if possible.
> > >
> > > > On Sun, Mar 20, 2022 at 1:46 AM David Karr
> > > > 
> > > > wrote:
> > > >
> > > > > On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana
> > > > > 
> > > > > wrote:
> > > > >
> > > > > > My advice is not to listen to everyone but rather understand how
> > > > > > things work.
> > > > > > Open this link in your browser
> > > > > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/j
> > > > > > unit
> > > > > > /platform/__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBu
> > > > > > Q2Td 7B4-_p53T9zXVk_Dp0MniLHv6riNYCbWzIuY$
> > > > > > It is groupId of some JUnit5 artifacts.
> > > > > > Do you see junit-platform-suite-api?
> > > > > > Scroll up and you will see junit-platform-suite. What's that?
> > > > > > It's the
> > > > > impl
> > > > > > of the api.
> > > > > > So, now you know what you miss in the dependencies.
> > > > > >

Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread Tibor Digana
Thx David, I will ping you with a pull request on Github soon.
Cheers
Tibor

On Sun, Mar 20, 2022 at 8:23 PM KARR, DAVID  wrote:

> Here's my ticket: https://issues.apache.org/jira/browse/SUREFIRE-2040 .
>
> > -Original Message-
> > From: Tibor Digana 
> > Sent: Sunday, March 20, 2022 12:03 PM
> > To: Maven Users List 
> > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> >
> > Hello David,
> >
> > I have an internal fix, zou won't be able to have it today. :-) But if
> > you have created the Jira ticket for us, we would make sure we are on
> > the right way.
> >
> > This is my suite class with JUnit5, just a principle (there might be
> > more children classes of course), and I use the command *mvn test -
> > Dtest=MyTestSuite* I hope I am on the right track.
> >
> > package pkg;
> >
> > import org.junit.platform.suite.api.SelectClasses;
> > import org.junit.platform.suite.api.Suite;
> >
> > @Suite
> > @SelectClasses(BDSHelperTest.class)
> > public class MyTestSuite {
> > }
> >
> >
> >
> >
> >
> > On Sun, Mar 20, 2022 at 6:25 PM KARR, DAVID  wrote:
> >
> > > > -Original Message-
> > > > From: Tibor Digana 
> > > > Sent: Sunday, March 20, 2022 6:42 AM
> > > > To: Maven Users List 
> > > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> > > >
> > > > There was the same question maybe one week ago.
> > > > I have created an example with JUnit4, see the next, and used the
> > > > configuration parameter ComponentTestSuite where the
> > > > command naturally works:
> > > >
> > > > mvn -Dtest=ComponentTestSuite test
> > > >
> > > > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
> > elapsed:
> > > > 0.14 s - in pkg.ComponentTestSuite
> > > >
> > > > After my fix this should work in JUnit5 provider. I have pushed a
> > > > test project with JUnit5 Suite, activate it via profile "suite", see
> > > > https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockit
> > > > o-
> > > > examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!BhdT!i5
> > > > Qv7K
> > > > rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > > > _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
> > > >
> > > > If there is a Jira ticket pls let me know and I will open a PR on
> > > > our GH.
> > >
> > > Thanks for the variations, I only care about the solution that moves
> > > forward with Junit5.
> > >
> > > You refer to a fix.  Is that something you've put into version
> > > 3.0.0-M6-SNAPSHOT that I would need for this to work?  I am attempting
> > > to get that version, but I'm having trouble configuring my
> > > settings.xml to get this to retrieve from the public repo. We engineer
> > > things so that all artifacts are retrieved from our internal artifact
> > > repository, which mirrors the public one.  If I need to, I will
> > > continue trying to figure that out.
> > >
> > > I have a feeling you're saying that with Junit5, you were unable to
> > > get to the point where you could specify a single test, being a test
> > > suite, on the command line, which I believe is why you asked if there
> > > is a JIRA ticket for this.  If you confirm that, I will create that
> > ticket.
> > >
> > > I see what you're doing with profiles.  For what we're trying to do
> > > here, I can see that this could at least be a functional 1-1
> > > replacement for specifying a single test on the command line, but I'd
> > > prefer not having to change how we do this, if possible.
> > >
> > > > On Sun, Mar 20, 2022 at 1:46 AM David Karr
> > > > 
> > > > wrote:
> > > >
> > > > > On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana
> > > > > 
> > > > > wrote:
> > > > >
> > > > > > My advice is not to listen to everyone but rather understand how
> > > > > > things work.
> > > > > > Open this link in your browser
> > > > > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/j
> > > > > > unit
> > > > > > /platform/__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBu
> > > > > > Q2Td 7B4-_p53T9zXVk_Dp0MniLHv6riNYCbWzIuY$
> > > > > > It is groupId of some JUnit5 artifacts.
> > > > > > Do you see junit-platform-suite-api?
> > > > > > Scroll up and you will see junit-platform-suite. What's that?
> > > > > > It's the
> > > > > impl
> > > > > > of the api.
> > > > > > So, now you know what you miss in the dependencies.
> > > > > >
> > > > > > This way just discover the entire hierarchy in
> > > > > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/j
> > > > > > unit
> > > > > > /__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > > > _p53T9zXVk_Dp0MniLHv6riNYGRYa8RR$  and the POMs and their
> > > > dependencies and transitive dependencies.
> > > > > > Then you would understand most of the typical troubles.
> > > > > > No magic, the trick is to read the content of the repo and the
> > > > > > content of POMs.
> > > > > >
> > > > > > I always have to do this when I am helping the users. All the
> > time.
> > > > > > The job starts with this if it is a simple problem. Always the
> > > > > > 

RE: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread KARR, DAVID
Here's my ticket: https://issues.apache.org/jira/browse/SUREFIRE-2040 .

> -Original Message-
> From: Tibor Digana 
> Sent: Sunday, March 20, 2022 12:03 PM
> To: Maven Users List 
> Subject: Re: Can't get Surefire to run any JUnit 5 tests
> 
> Hello David,
> 
> I have an internal fix, zou won't be able to have it today. :-) But if
> you have created the Jira ticket for us, we would make sure we are on
> the right way.
> 
> This is my suite class with JUnit5, just a principle (there might be
> more children classes of course), and I use the command *mvn test -
> Dtest=MyTestSuite* I hope I am on the right track.
> 
> package pkg;
> 
> import org.junit.platform.suite.api.SelectClasses;
> import org.junit.platform.suite.api.Suite;
> 
> @Suite
> @SelectClasses(BDSHelperTest.class)
> public class MyTestSuite {
> }
> 
> 
> 
> 
> 
> On Sun, Mar 20, 2022 at 6:25 PM KARR, DAVID  wrote:
> 
> > > -Original Message-
> > > From: Tibor Digana 
> > > Sent: Sunday, March 20, 2022 6:42 AM
> > > To: Maven Users List 
> > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> > >
> > > There was the same question maybe one week ago.
> > > I have created an example with JUnit4, see the next, and used the
> > > configuration parameter ComponentTestSuite where the
> > > command naturally works:
> > >
> > > mvn -Dtest=ComponentTestSuite test
> > >
> > > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
> elapsed:
> > > 0.14 s - in pkg.ComponentTestSuite
> > >
> > > After my fix this should work in JUnit5 provider. I have pushed a
> > > test project with JUnit5 Suite, activate it via profile "suite", see
> > > https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockit
> > > o-
> > > examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!BhdT!i5
> > > Qv7K
> > > rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > > _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
> > >
> > > If there is a Jira ticket pls let me know and I will open a PR on
> > > our GH.
> >
> > Thanks for the variations, I only care about the solution that moves
> > forward with Junit5.
> >
> > You refer to a fix.  Is that something you've put into version
> > 3.0.0-M6-SNAPSHOT that I would need for this to work?  I am attempting
> > to get that version, but I'm having trouble configuring my
> > settings.xml to get this to retrieve from the public repo. We engineer
> > things so that all artifacts are retrieved from our internal artifact
> > repository, which mirrors the public one.  If I need to, I will
> > continue trying to figure that out.
> >
> > I have a feeling you're saying that with Junit5, you were unable to
> > get to the point where you could specify a single test, being a test
> > suite, on the command line, which I believe is why you asked if there
> > is a JIRA ticket for this.  If you confirm that, I will create that
> ticket.
> >
> > I see what you're doing with profiles.  For what we're trying to do
> > here, I can see that this could at least be a functional 1-1
> > replacement for specifying a single test on the command line, but I'd
> > prefer not having to change how we do this, if possible.
> >
> > > On Sun, Mar 20, 2022 at 1:46 AM David Karr
> > > 
> > > wrote:
> > >
> > > > On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana
> > > > 
> > > > wrote:
> > > >
> > > > > My advice is not to listen to everyone but rather understand how
> > > > > things work.
> > > > > Open this link in your browser
> > > > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/j
> > > > > unit
> > > > > /platform/__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBu
> > > > > Q2Td 7B4-_p53T9zXVk_Dp0MniLHv6riNYCbWzIuY$
> > > > > It is groupId of some JUnit5 artifacts.
> > > > > Do you see junit-platform-suite-api?
> > > > > Scroll up and you will see junit-platform-suite. What's that?
> > > > > It's the
> > > > impl
> > > > > of the api.
> > > > > So, now you know what you miss in the dependencies.
> > > > >
> > > > > This way just discover the entire hierarchy in
> > > > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/j
> > > > > unit
> > > > > /__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > > _p53T9zXVk_Dp0MniLHv6riNYGRYa8RR$  and the POMs and their
> > > dependencies and transitive dependencies.
> > > > > Then you would understand most of the typical troubles.
> > > > > No magic, the trick is to read the content of the repo and the
> > > > > content of POMs.
> > > > >
> > > > > I always have to do this when I am helping the users. All the
> time.
> > > > > The job starts with this if it is a simple problem. Always the
> > > > > same, all the time.
> > > > >
> > > >
> > > > Ok, I appreciate that. However, perhaps I didn't emphasize the
> > > > correct thing in my last response. Fixing the compile error was
> simple to do.
> > > > The last problem I have is the problem with running a component
> > > > test suite from the command line. This is actually the first
> > > > problem I was made 

Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread Tibor Digana
Hello David,

I have an internal fix, zou won't be able to have it today. :-)
But if you have created the Jira ticket for us, we would make sure we are
on the right way.

This is my suite class with JUnit5, just a principle (there might be more
children classes of course), and I use the command
*mvn test -Dtest=MyTestSuite*
I hope I am on the right track.

package pkg;

import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@Suite
@SelectClasses(BDSHelperTest.class)
public class MyTestSuite {
}





On Sun, Mar 20, 2022 at 6:25 PM KARR, DAVID  wrote:

> > -Original Message-
> > From: Tibor Digana 
> > Sent: Sunday, March 20, 2022 6:42 AM
> > To: Maven Users List 
> > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> >
> > There was the same question maybe one week ago.
> > I have created an example with JUnit4, see the next, and used the
> > configuration parameter ComponentTestSuite where the
> > command naturally works:
> >
> > mvn -Dtest=ComponentTestSuite test
> >
> > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> > 0.14 s - in pkg.ComponentTestSuite
> >
> > After my fix this should work in JUnit5 provider. I have pushed a test
> > project with JUnit5 Suite, activate it via profile "suite", see
> > https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockito-
> > examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!BhdT!i5Qv7K
> > rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
> >
> > If there is a Jira ticket pls let me know and I will open a PR on our
> > GH.
>
> Thanks for the variations, I only care about the solution that moves
> forward with Junit5.
>
> You refer to a fix.  Is that something you've put into version
> 3.0.0-M6-SNAPSHOT that I would need for this to work?  I am attempting to
> get that version, but I'm having trouble configuring my settings.xml to get
> this to retrieve from the public repo. We engineer things so that all
> artifacts are retrieved from our internal artifact repository, which
> mirrors the public one.  If I need to, I will continue trying to figure
> that out.
>
> I have a feeling you're saying that with Junit5, you were unable to get to
> the point where you could specify a single test, being a test suite, on the
> command line, which I believe is why you asked if there is a JIRA ticket
> for this.  If you confirm that, I will create that ticket.
>
> I see what you're doing with profiles.  For what we're trying to do here,
> I can see that this could at least be a functional 1-1 replacement for
> specifying a single test on the command line, but I'd prefer not having to
> change how we do this, if possible.
>
> > On Sun, Mar 20, 2022 at 1:46 AM David Karr 
> > wrote:
> >
> > > On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana 
> > > wrote:
> > >
> > > > My advice is not to listen to everyone but rather understand how
> > > > things work.
> > > > Open this link in your browser
> > > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/junit
> > > > /platform/__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td
> > > > 7B4-_p53T9zXVk_Dp0MniLHv6riNYCbWzIuY$
> > > > It is groupId of some JUnit5 artifacts.
> > > > Do you see junit-platform-suite-api?
> > > > Scroll up and you will see junit-platform-suite. What's that? It's
> > > > the
> > > impl
> > > > of the api.
> > > > So, now you know what you miss in the dependencies.
> > > >
> > > > This way just discover the entire hierarchy in
> > > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/junit
> > > > /__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> > _p53T9zXVk_Dp0MniLHv6riNYGRYa8RR$  and the POMs and their dependencies
> > and transitive dependencies.
> > > > Then you would understand most of the typical troubles.
> > > > No magic, the trick is to read the content of the repo and the
> > > > content of POMs.
> > > >
> > > > I always have to do this when I am helping the users. All the time.
> > > > The job starts with this if it is a simple problem. Always the same,
> > > > all the time.
> > > >
> > >
> > > Ok, I appreciate that. However, perhaps I didn't emphasize the correct
> > > thing in my last response. Fixing the compile error was simple to do.
> > > The last problem I have is the problem with running a component test
> > > suite from the command line. This is actually the first problem I was
> > > made aware of when I first started examining this entire functional
> > area.
> > >
> > >
> > > > T
> > > >
> > > >
> > > >
> > > >
> > > > On Sat, Mar 19, 2022 at 10:57 PM KARR, DAVID  wrote:
> > > >
> > > > > This is progress.  I at least now see both Junit 5 and Junit 4
> > > > > tests running successfully.
> > > > >
> > > > > I have a couple of related questions, one of which is likely
> > > > > entirely Junit-related, but which you might have run into, and the
> > > > > other is more
> > > > on
> > > > > Surefire.
> > > > >
> > 

[ANN] Apache Maven JXR 3.2.0 Released

2022-03-20 Thread Slawomir Jaranowski
The Apache Maven team is pleased to announce the release of the Apache JXR,
version 3.2.0

The Apache Maven JXR project is a library to analyze a set of Java source
files and produces documentation in HTML format à la Javadoc.
The Apache Maven JXR Plugin produces a cross-reference of the project's
sources.

https://maven.apache.org/jxr/

You can download the appropriate sources etc. from the download page:

https://maven.apache.org/jxr/download.cgi

Release Notes - Maven JXR - Version 3.2.0

** Bug
* [JXR-164] - Full path to local code sources in page title

** Task
* [JXR-162] - Lift Minimum Java to Java 8

** Dependency upgrade
* [JXR-157] - Upgrade Velocity templating engine
* [JXR-163] - Require Maven 3.2.5+
* [JXR-165] - Upgrade Maven Reporting to 3.1.0
* [JXR-167] - Upgrade Parent to 35
* [JXR-168] - Dependency upgrade and cleanup

Enjoy,

-The Apache Maven team


RE: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread KARR, DAVID
> -Original Message-
> From: Tibor Digana 
> Sent: Sunday, March 20, 2022 6:42 AM
> To: Maven Users List 
> Subject: Re: Can't get Surefire to run any JUnit 5 tests
> 
> There was the same question maybe one week ago.
> I have created an example with JUnit4, see the next, and used the
> configuration parameter ComponentTestSuite where the
> command naturally works:
> 
> mvn -Dtest=ComponentTestSuite test
> 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> 0.14 s - in pkg.ComponentTestSuite
> 
> After my fix this should work in JUnit5 provider. I have pushed a test
> project with JUnit5 Suite, activate it via profile "suite", see
> https://urldefense.com/v3/__https://github.com/Tibor17/junit5-mockito-
> examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779__;!!BhdT!i5Qv7K
> rfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> _p53T9zXVk_Dp0MniLHv6riNYEbn9UVw$
> 
> If there is a Jira ticket pls let me know and I will open a PR on our
> GH.

Thanks for the variations, I only care about the solution that moves forward 
with Junit5.

You refer to a fix.  Is that something you've put into version 
3.0.0-M6-SNAPSHOT that I would need for this to work?  I am attempting to get 
that version, but I'm having trouble configuring my settings.xml to get this to 
retrieve from the public repo. We engineer things so that all artifacts are 
retrieved from our internal artifact repository, which mirrors the public one.  
If I need to, I will continue trying to figure that out.

I have a feeling you're saying that with Junit5, you were unable to get to the 
point where you could specify a single test, being a test suite, on the command 
line, which I believe is why you asked if there is a JIRA ticket for this.  If 
you confirm that, I will create that ticket.

I see what you're doing with profiles.  For what we're trying to do here, I can 
see that this could at least be a functional 1-1 replacement for specifying a 
single test on the command line, but I'd prefer not having to change how we do 
this, if possible.

> On Sun, Mar 20, 2022 at 1:46 AM David Karr 
> wrote:
> 
> > On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana 
> > wrote:
> >
> > > My advice is not to listen to everyone but rather understand how
> > > things work.
> > > Open this link in your browser
> > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/junit
> > > /platform/__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td
> > > 7B4-_p53T9zXVk_Dp0MniLHv6riNYCbWzIuY$
> > > It is groupId of some JUnit5 artifacts.
> > > Do you see junit-platform-suite-api?
> > > Scroll up and you will see junit-platform-suite. What's that? It's
> > > the
> > impl
> > > of the api.
> > > So, now you know what you miss in the dependencies.
> > >
> > > This way just discover the entire hierarchy in
> > > https://urldefense.com/v3/__https://repo1.maven.org/maven2/org/junit
> > > /__;!!BhdT!i5Qv7KrfNE1_FyC63UP16CRSEh0UxMbSSwKn7EBgkKBuQ2Td7B4-
> _p53T9zXVk_Dp0MniLHv6riNYGRYa8RR$  and the POMs and their dependencies
> and transitive dependencies.
> > > Then you would understand most of the typical troubles.
> > > No magic, the trick is to read the content of the repo and the
> > > content of POMs.
> > >
> > > I always have to do this when I am helping the users. All the time.
> > > The job starts with this if it is a simple problem. Always the same,
> > > all the time.
> > >
> >
> > Ok, I appreciate that. However, perhaps I didn't emphasize the correct
> > thing in my last response. Fixing the compile error was simple to do.
> > The last problem I have is the problem with running a component test
> > suite from the command line. This is actually the first problem I was
> > made aware of when I first started examining this entire functional
> area.
> >
> >
> > > T
> > >
> > >
> > >
> > >
> > > On Sat, Mar 19, 2022 at 10:57 PM KARR, DAVID  wrote:
> > >
> > > > This is progress.  I at least now see both Junit 5 and Junit 4
> > > > tests running successfully.
> > > >
> > > > I have a couple of related questions, one of which is likely
> > > > entirely Junit-related, but which you might have run into, and the
> > > > other is more
> > > on
> > > > Surefire.
> > > >
> > > > We also have some test suites, which is where we base our
> "component"
> > and
> > > > "integration" tests, neither of which run as unit tests.  I'm
> > > > focusing
> > in
> > > > the component tests first, but I think whatever we do to fix the
> > > component
> > > > tests will be the same for the integration tests.
> > > >
> > > > With the dependencies you specified, that results in compile
> > > > errors for missing classes in "org.junit.platform.suite.api.*".
> > > > That is in the "junit-platform-suite-api" dependency.  It's simple
> > > > enough to include
> > > that
> > > > dependency, and that resolves that compile error.  I assume that's
> > > > the
> > > best
> > > > resolution for that?
> > > >
> > > > Finally, the issue that is actually one of the first 

Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread Tibor Digana
There was the same question maybe one week ago.
I have created an example with JUnit4, see the next, and used the
configuration parameter ComponentTestSuite where the command
naturally works:

mvn -Dtest=ComponentTestSuite test

[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.14
s - in pkg.ComponentTestSuite

After my fix this should work in JUnit5 provider. I have pushed a test
project with JUnit5 Suite, activate it via profile "suite", see
https://github.com/Tibor17/junit5-mockito-examples/commit/c87038b8154ae908ff50bd84e19776dfbddbe779

If there is a Jira ticket pls let me know and I will open a PR on our GH.

This is the example with JUnit4:

http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
  4.0.0
  org.apache.maven
  junit4-test-suite
  1.0-SNAPSHOT

1.8
UTF-8
  
  
  
  junit
  junit
  4.13.2
  test
  
  
  
 
   
 org.apache.maven.plugins
 maven-compiler-plugin
 3.10.1
   
   
  org.apache.maven.plugins
   maven-surefire-plugin
   3.0.0-M5
   
   ComponentTestSuite
   
   
 
   




package pkg;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses(MyTest.class)
public class ComponentTestSuite {
}



package pkg;

import org.junit.Test;

public class MyTest {
@Test
public void test() {}
}



On Sun, Mar 20, 2022 at 1:46 AM David Karr 
wrote:

> On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana 
> wrote:
>
> > My advice is not to listen to everyone but rather understand how things
> > work.
> > Open this link in your browser
> > https://repo1.maven.org/maven2/org/junit/platform/
> > It is groupId of some JUnit5 artifacts.
> > Do you see junit-platform-suite-api?
> > Scroll up and you will see junit-platform-suite. What's that? It's the
> impl
> > of the api.
> > So, now you know what you miss in the dependencies.
> >
> > This way just discover the entire hierarchy in
> > https://repo1.maven.org/maven2/org/junit/ and the POMs and their
> > dependencies and transitive dependencies.
> > Then you would understand most of the typical troubles.
> > No magic, the trick is to read the content of the repo and the content of
> > POMs.
> >
> > I always have to do this when I am helping the users. All the time.
> > The job starts with this if it is a simple problem. Always the same, all
> > the time.
> >
>
> Ok, I appreciate that. However, perhaps I didn't emphasize the correct
> thing in my last response. Fixing the compile error was simple to do.  The
> last problem I have is the problem with running a component test suite from
> the command line. This is actually the first problem I was made aware of
> when I first started examining this entire functional area.
>
>
> > T
> >
> >
> >
> >
> > On Sat, Mar 19, 2022 at 10:57 PM KARR, DAVID  wrote:
> >
> > > This is progress.  I at least now see both Junit 5 and Junit 4 tests
> > > running successfully.
> > >
> > > I have a couple of related questions, one of which is likely entirely
> > > Junit-related, but which you might have run into, and the other is more
> > on
> > > Surefire.
> > >
> > > We also have some test suites, which is where we base our "component"
> and
> > > "integration" tests, neither of which run as unit tests.  I'm focusing
> in
> > > the component tests first, but I think whatever we do to fix the
> > component
> > > tests will be the same for the integration tests.
> > >
> > > With the dependencies you specified, that results in compile errors for
> > > missing classes in "org.junit.platform.suite.api.*".  That is in the
> > > "junit-platform-suite-api" dependency.  It's simple enough to include
> > that
> > > dependency, and that resolves that compile error.  I assume that's the
> > best
> > > resolution for that?
> > >
> > > Finally, the issue that is actually one of the first trouble spots we
> > > noticed, which is being able to execute test suites from the mvn
> command
> > > line.
> > >
> > > With Junit4, we would execute our component tests with just this:
> > >
> > > mvn -Dtest=ComponentTestSuite test
> > >
> > > With these new frameworks, this fails with "No tests were executed".
> I've
> > > tried numerous variations of this.
> > >
> > > The minimal class I have is this:
> > >
> > > import org.junit.platform.suite.api.SelectClasses;
> > > import org.junit.platform.suite.api.Suite;
> > >
> > > @Suite
> > > @SelectClasses(NoteResourceCT.class)
> > > public class ComponentTestSuite {
> > > }
> > >
> > > I have heard some mentions of "Tags" in Junit5 and 

Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread John Patrick
I've update my example with more of my setup
https://gist.github.com/nhojpatrick/e598205e23ff3ee226673d11bc339bf6

For your example you talk about suite, I've not used suite, based upon
jupiter and vintage, I would expect you would need to add
junit-platfore-suite-engine as a dependency so the suite engine enables and
scans for tests.

All integration tests end IT and for simplicity are under src/test/java,
all component/unit tests are also under src/test/java.

I've got both JUnit v4 and JUnit v5 unit tests and integration tests as I'm
migrating from one to the other when time allows.

I've got maven wrapper so I simply do;
./mvnw clean install

Before anyone comments, I don't do `./mvnw clean verify` because 90% of the
time it causes more issues with multimodule projects, normally when I need
to use `-rf,--resume-from`.

John



On Sun, 20 Mar 2022 at 00:45, David Karr  wrote:

> On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana 
> wrote:
>
> > My advice is not to listen to everyone but rather understand how things
> > work.
> > Open this link in your browser
> > https://repo1.maven.org/maven2/org/junit/platform/
> > It is groupId of some JUnit5 artifacts.
> > Do you see junit-platform-suite-api?
> > Scroll up and you will see junit-platform-suite. What's that? It's the
> impl
> > of the api.
> > So, now you know what you miss in the dependencies.
> >
> > This way just discover the entire hierarchy in
> > https://repo1.maven.org/maven2/org/junit/ and the POMs and their
> > dependencies and transitive dependencies.
> > Then you would understand most of the typical troubles.
> > No magic, the trick is to read the content of the repo and the content of
> > POMs.
> >
> > I always have to do this when I am helping the users. All the time.
> > The job starts with this if it is a simple problem. Always the same, all
> > the time.
> >
>
> Ok, I appreciate that. However, perhaps I didn't emphasize the correct
> thing in my last response. Fixing the compile error was simple to do.  The
> last problem I have is the problem with running a component test suite from
> the command line. This is actually the first problem I was made aware of
> when I first started examining this entire functional area.
>
>
> > T
> >
> >
> >
> >
> > On Sat, Mar 19, 2022 at 10:57 PM KARR, DAVID  wrote:
> >
> > > This is progress.  I at least now see both Junit 5 and Junit 4 tests
> > > running successfully.
> > >
> > > I have a couple of related questions, one of which is likely entirely
> > > Junit-related, but which you might have run into, and the other is more
> > on
> > > Surefire.
> > >
> > > We also have some test suites, which is where we base our "component"
> and
> > > "integration" tests, neither of which run as unit tests.  I'm focusing
> in
> > > the component tests first, but I think whatever we do to fix the
> > component
> > > tests will be the same for the integration tests.
> > >
> > > With the dependencies you specified, that results in compile errors for
> > > missing classes in "org.junit.platform.suite.api.*".  That is in the
> > > "junit-platform-suite-api" dependency.  It's simple enough to include
> > that
> > > dependency, and that resolves that compile error.  I assume that's the
> > best
> > > resolution for that?
> > >
> > > Finally, the issue that is actually one of the first trouble spots we
> > > noticed, which is being able to execute test suites from the mvn
> command
> > > line.
> > >
> > > With Junit4, we would execute our component tests with just this:
> > >
> > > mvn -Dtest=ComponentTestSuite test
> > >
> > > With these new frameworks, this fails with "No tests were executed".
> I've
> > > tried numerous variations of this.
> > >
> > > The minimal class I have is this:
> > >
> > > import org.junit.platform.suite.api.SelectClasses;
> > > import org.junit.platform.suite.api.Suite;
> > >
> > > @Suite
> > > @SelectClasses(NoteResourceCT.class)
> > > public class ComponentTestSuite {
> > > }
> > >
> > > I have heard some mentions of "Tags" in Junit5 and "groups" in
> Surefire.
> > > I have experimented with those, but I still haven't gotten anything to
> > work.
> > >
> > > > -Original Message-
> > > > From: Tibor Digana 
> > > > Sent: Saturday, March 19, 2022 1:55 PM
> > > > To: Maven Users List 
> > > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> > > >
> > > > No problem, pls see the project again, there is an update.
> > > > T
> > > >
> > > > On Sat, Mar 19, 2022 at 9:32 PM KARR, DAVID  wrote:
> > > >
> > > > > One thing that I see I neglected to mention in this post, but
> which I
> > > > > did mention in the SO posting I linked to, is that I have both
> Junit5
> > > > > and
> > > > > Junit4 tests in scope.  I believe that is at least one element that
> > > > > makes this more complicated.
> > > > >
> > > > > > -Original Message-
> > > > > > From: Tibor Digana 
> > > > > > Sent: Saturday, March 19, 2022 1:27 PM
> > > > > >