You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Vladimir Machat <ma...@gmail.com> on 2022/09/18 21:49:13 UTC

maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

I have been trying to figure out how to get JUnit 5 tests working 
correctly in Netbeans 15.

with maven-surefire-plugin version 2.19.1 and lower it works but with 
versions starting 2.20 the Test Result window in Netbeans just says 'No 
tests executed' even though in the Output window I can see that they 
were executed.

Running tests from command line - mvn surefire:test - works fine, tests 
are executed.

Setting trimStackTrace to false didn't help.


Netbeans version 15

Java tried with 8, 11, 17 and 18

Maven tried with 3.8.6 and 3.8.4

Junit 5 tried with almost all versions from 5.6.0 to 5.9.0

OS Linux Manjaro

pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="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">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.atrament</groupId>
     <artifactId>TestJunit5</artifactId>
     <version>0.1</version>
     <packaging>jar</packaging>
     <dependencies>
         <dependency>
             <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter</artifactId>
             <version>5.9.0</version>
             <scope>test</scope>
             <type>jar</type>
         </dependency>
     </dependencies>
     <build>
         <plugins>
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>2.20</version>
             </plugin>
         </plugins>
     </build>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <maven.compiler.source>11</maven.compiler.source>
         <maven.compiler.target>11</maven.compiler.target>
         <exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
     </properties>
</project>

Can anyone help please?

Thanks

Vlad

Re: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

Posted by Vladimir Machat <ma...@gmail.com>.
Hi Chriss,

thanks but artifact junit-jupiter is 'aggregator artifact that 
transitively pulls in dependencies on junit-jupiter-api, 
junit-jupiter-params, and junit-jupiter-engine' (quoting the 
documentation). But even if I directly specify the dependencies it makes 
no difference, still the same problem. But as I wrote before, it works 
on current git master branch so it has been fixed and will be working in 
the next release, hopefully.

On 26/09/2022 11:27, Luff, Chris wrote:
> It’s not maven, you don’t have the junit-jupiter-engine of the classpath.
>
> Modify your pom to include;
>
>          <dependency>
>              <groupId>org.junit.jupiter</groupId>
>              <artifactId>junit-jupiter</artifactId>
>              <scope>test</scope>
>          </dependency>
>          <dependency>
>              <groupId>org.junit.jupiter</groupId>
>              <artifactId>junit-jupiter-api</artifactId>
>              <scope>test</scope>
>          </dependency>
>          <dependency>
>              <groupId>org.junit.jupiter</groupId>
>              <artifactId>junit-jupiter-engine</artifactId>
>              <scope>test</scope>
>          </dependency>
>
> Should be fine after that.
>
> Nb. version omitted
>
>> On 20 Sep 2022, at 20:40, Vladimir Machat<ma...@gmail.com>  wrote:
>>
>> Hi,
>>
>> just FYI I tried it with the git version of Netbeans and it seems to be working there. So I guess we will have to wait for Netbeans 16 to have testing fully working again :)
>>
>> On 20/09/2022 13:54, Jean-Marc Borer wrote:
>>> Hello Vlad,
>>>
>>> I have this issue since a looonnnnngg time. It started with NB 12 (or even
>>> 11 not sure). I still don't know why it is failling.
>>>
>>> Sorry not beining able to help you. Please file an issue on Github but make
>>> sure there not already one.
>>>
>>> Best regards,
>>>
>>> JM
>>>
>>> On Sun, Sep 18, 2022 at 9:49 PM Vladimir Machat<ma...@gmail.com>   wrote:
>>>
>>>> I have been trying to figure out how to get JUnit 5 tests working
>>>> correctly in Netbeans 15.
>>>>
>>>> with maven-surefire-plugin version 2.19.1 and lower it works but with
>>>> versions starting 2.20 the Test Result window in Netbeans just says 'No
>>>> tests executed' even though in the Output window I can see that they
>>>> were executed.
>>>>
>>>> Running tests from command line - mvn surefire:test - works fine, tests
>>>> are executed.
>>>>
>>>> Setting trimStackTrace to false didn't help.
>>>>
>>>>
>>>> Netbeans version 15
>>>>
>>>> Java tried with 8, 11, 17 and 18
>>>>
>>>> Maven tried with 3.8.6 and 3.8.4
>>>>
>>>> Junit 5 tried with almost all versions from 5.6.0 to 5.9.0
>>>>
>>>> OS Linux Manjaro
>>>>
>>>> pom:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <project xmlns="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FPOM%2F4.0.0&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=r3kYJKprinGiujsIyeLJPvN99xRv3jovNRnW3kHe52Q%3D&amp;reserved=0"    xmlns:xsi=" 
>>>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=WE7V%2FcQITFeNdjeVB4ZxnGdL0NA13hfsphpmIH23EzY%3D&amp;reserved=0"    xsi:schemaLocation=" 
>>>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FPOM%2F4.0.0&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=r3kYJKprinGiujsIyeLJPvN99xRv3jovNRnW3kHe52Q%3D&amp;reserved=0 
>>>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2Fxsd%2Fmaven-4.0.0.xsd&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=iuu%2BeuAzur7o7R7NVf6IS%2BOP3ZuvJKlDMSedzD8iKl4%3D&amp;reserved=0">
>>>>       <modelVersion>4.0.0</modelVersion>
>>>>       <groupId>org.atrament</groupId>
>>>>       <artifactId>TestJunit5</artifactId>
>>>>       <version>0.1</version>
>>>>       <packaging>jar</packaging>
>>>>       <dependencies>
>>>>           <dependency>
>>>>               <groupId>org.junit.jupiter</groupId>
>>>>               <artifactId>junit-jupiter</artifactId>
>>>>               <version>5.9.0</version>
>>>>               <scope>test</scope>
>>>>               <type>jar</type>
>>>>           </dependency>
>>>>       </dependencies>
>>>>       <build>
>>>>           <plugins>
>>>>               <plugin>
>>>>                   <artifactId>maven-surefire-plugin</artifactId>
>>>>                   <version>2.20</version>
>>>>               </plugin>
>>>>           </plugins>
>>>>       </build>
>>>>       <properties>
>>>>           <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>>>           <maven.compiler.source>11</maven.compiler.source>
>>>>           <maven.compiler.target>11</maven.compiler.target>
>>>>
>>>> <exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
>>>>       </properties>
>>>> </project>
>>>>
>>>> Can anyone help please?
>>>>
>>>> Thanks
>>>>
>>>> Vlad
>
>
> CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. Cerner Limited, Registered in England no 2519305, Registered Office 37 North Wharf Road, London W2 1AF.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail:dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

Re: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

Posted by "Luff, Chris" <ch...@cerner.com.INVALID>.
It’s not maven, you don’t have the junit-jupiter-engine of the classpath.

Modify your pom to include;

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>

Should be fine after that.

Nb. version omitted

> On 20 Sep 2022, at 20:40, Vladimir Machat <ma...@gmail.com> wrote:
>
> Hi,
>
> just FYI I tried it with the git version of Netbeans and it seems to be working there. So I guess we will have to wait for Netbeans 16 to have testing fully working again :)
>
> On 20/09/2022 13:54, Jean-Marc Borer wrote:
>> Hello Vlad,
>>
>> I have this issue since a looonnnnngg time. It started with NB 12 (or even
>> 11 not sure). I still don't know why it is failling.
>>
>> Sorry not beining able to help you. Please file an issue on Github but make
>> sure there not already one.
>>
>> Best regards,
>>
>> JM
>>
>> On Sun, Sep 18, 2022 at 9:49 PM Vladimir Machat<ma...@gmail.com>  wrote:
>>
>>> I have been trying to figure out how to get JUnit 5 tests working
>>> correctly in Netbeans 15.
>>>
>>> with maven-surefire-plugin version 2.19.1 and lower it works but with
>>> versions starting 2.20 the Test Result window in Netbeans just says 'No
>>> tests executed' even though in the Output window I can see that they
>>> were executed.
>>>
>>> Running tests from command line - mvn surefire:test - works fine, tests
>>> are executed.
>>>
>>> Setting trimStackTrace to false didn't help.
>>>
>>>
>>> Netbeans version 15
>>>
>>> Java tried with 8, 11, 17 and 18
>>>
>>> Maven tried with 3.8.6 and 3.8.4
>>>
>>> Junit 5 tried with almost all versions from 5.6.0 to 5.9.0
>>>
>>> OS Linux Manjaro
>>>
>>> pom:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <project xmlns="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FPOM%2F4.0.0&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=r3kYJKprinGiujsIyeLJPvN99xRv3jovNRnW3kHe52Q%3D&amp;reserved=0"   xmlns:xsi=" https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=WE7V%2FcQITFeNdjeVB4ZxnGdL0NA13hfsphpmIH23EzY%3D&amp;reserved=0"   xsi:schemaLocation=" https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FPOM%2F4.0.0&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=r3kYJKprinGiujsIyeLJPvN99xRv3jovNRnW3kHe52Q%3D&amp;reserved=0 https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2Fxsd%2Fmaven-4.0.0.xsd&amp;data=05%7C01%7CChris.Luff%40cerner.com%7Cdfca7facb91e49f8a01708da9b401540%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637992996809993449%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=iuu%2BeuAzur7o7R7NVf6IS%2BOP3ZuvJKlDMSedzD8iKl4%3D&amp;reserved=0">
>>>      <modelVersion>4.0.0</modelVersion>
>>>      <groupId>org.atrament</groupId>
>>>      <artifactId>TestJunit5</artifactId>
>>>      <version>0.1</version>
>>>      <packaging>jar</packaging>
>>>      <dependencies>
>>>          <dependency>
>>>              <groupId>org.junit.jupiter</groupId>
>>>              <artifactId>junit-jupiter</artifactId>
>>>              <version>5.9.0</version>
>>>              <scope>test</scope>
>>>              <type>jar</type>
>>>          </dependency>
>>>      </dependencies>
>>>      <build>
>>>          <plugins>
>>>              <plugin>
>>>                  <artifactId>maven-surefire-plugin</artifactId>
>>>                  <version>2.20</version>
>>>              </plugin>
>>>          </plugins>
>>>      </build>
>>>      <properties>
>>>          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>>          <maven.compiler.source>11</maven.compiler.source>
>>>          <maven.compiler.target>11</maven.compiler.target>
>>>
>>> <exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
>>>      </properties>
>>> </project>
>>>
>>> Can anyone help please?
>>>
>>> Thanks
>>>
>>> Vlad



CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. Cerner Limited, Registered in England no 2519305, Registered Office 37 North Wharf Road, London W2 1AF.

Re: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

Posted by Vladimir Machat <ma...@gmail.com>.
Hi,

just FYI I tried it with the git version of Netbeans and it seems to be 
working there. So I guess we will have to wait for Netbeans 16 to have 
testing fully working again :)

On 20/09/2022 13:54, Jean-Marc Borer wrote:
> Hello Vlad,
>
> I have this issue since a looonnnnngg time. It started with NB 12 (or even
> 11 not sure). I still don't know why it is failling.
>
> Sorry not beining able to help you. Please file an issue on Github but make
> sure there not already one.
>
> Best regards,
>
> JM
>
> On Sun, Sep 18, 2022 at 9:49 PM Vladimir Machat<ma...@gmail.com>  wrote:
>
>> I have been trying to figure out how to get JUnit 5 tests working
>> correctly in Netbeans 15.
>>
>> with maven-surefire-plugin version 2.19.1 and lower it works but with
>> versions starting 2.20 the Test Result window in Netbeans just says 'No
>> tests executed' even though in the Output window I can see that they
>> were executed.
>>
>> Running tests from command line - mvn surefire:test - works fine, tests
>> are executed.
>>
>> Setting trimStackTrace to false didn't help.
>>
>>
>> Netbeans version 15
>>
>> Java tried with 8, 11, 17 and 18
>>
>> Maven tried with 3.8.6 and 3.8.4
>>
>> Junit 5 tried with almost all versions from 5.6.0 to 5.9.0
>>
>> OS Linux Manjaro
>>
>> pom:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project xmlns="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">
>>       <modelVersion>4.0.0</modelVersion>
>>       <groupId>org.atrament</groupId>
>>       <artifactId>TestJunit5</artifactId>
>>       <version>0.1</version>
>>       <packaging>jar</packaging>
>>       <dependencies>
>>           <dependency>
>>               <groupId>org.junit.jupiter</groupId>
>>               <artifactId>junit-jupiter</artifactId>
>>               <version>5.9.0</version>
>>               <scope>test</scope>
>>               <type>jar</type>
>>           </dependency>
>>       </dependencies>
>>       <build>
>>           <plugins>
>>               <plugin>
>>                   <artifactId>maven-surefire-plugin</artifactId>
>>                   <version>2.20</version>
>>               </plugin>
>>           </plugins>
>>       </build>
>>       <properties>
>>           <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>           <maven.compiler.source>11</maven.compiler.source>
>>           <maven.compiler.target>11</maven.compiler.target>
>>
>> <exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
>>       </properties>
>> </project>
>>
>> Can anyone help please?
>>
>> Thanks
>>
>> Vlad
>>

Re: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

Posted by Vladimir Machat <ma...@gmail.com>.
I tried both of them, neither works:(

On 20/09/2022 14:48, Eric Barboni wrote:
> Hi, did you try the 3.0.0-M7 or 2.22.0 version of surefire?
> They contains junit 5 fixes
>
> Regards
> Eric
> -----Message d'origine-----
> De : Jean-Marc Borer<jm...@gmail.com>  
> Envoyé : mardi 20 septembre 2022 14:55
> À :dev@netbeans.apache.org
> Objet : Re: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window
>
> Hello Vlad,
>
> I have this issue since a looonnnnngg time. It started with NB 12 (or even
> 11 not sure). I still don't know why it is failling.
>
> Sorry not beining able to help you. Please file an issue on Github but make sure there not already one.
>
> Best regards,
>
> JM
>
> On Sun, Sep 18, 2022 at 9:49 PM Vladimir Machat<ma...@gmail.com>  wrote:
>
>> I have been trying to figure out how to get JUnit 5 tests working
>> correctly in Netbeans 15.
>>
>> with maven-surefire-plugin version 2.19.1 and lower it works but with
>> versions starting 2.20 the Test Result window in Netbeans just says
>> 'No tests executed' even though in the Output window I can see that
>> they were executed.
>>
>> Running tests from command line - mvn surefire:test - works fine,
>> tests are executed.
>>
>> Setting trimStackTrace to false didn't help.
>>
>>
>> Netbeans version 15
>>
>> Java tried with 8, 11, 17 and 18
>>
>> Maven tried with 3.8.6 and 3.8.4
>>
>> Junit 5 tried with almost all versions from 5.6.0 to 5.9.0
>>
>> OS Linux Manjaro
>>
>> pom:
>>
>> <?xml version="1.0" encoding="UTF-8"?> <project
>> xmlns="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">
>>       <modelVersion>4.0.0</modelVersion>
>>       <groupId>org.atrament</groupId>
>>       <artifactId>TestJunit5</artifactId>
>>       <version>0.1</version>
>>       <packaging>jar</packaging>
>>       <dependencies>
>>           <dependency>
>>               <groupId>org.junit.jupiter</groupId>
>>               <artifactId>junit-jupiter</artifactId>
>>               <version>5.9.0</version>
>>               <scope>test</scope>
>>               <type>jar</type>
>>           </dependency>
>>       </dependencies>
>>       <build>
>>           <plugins>
>>               <plugin>
>>                   <artifactId>maven-surefire-plugin</artifactId>
>>                   <version>2.20</version>
>>               </plugin>
>>           </plugins>
>>       </build>
>>       <properties>
>>           <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>           <maven.compiler.source>11</maven.compiler.source>
>>           <maven.compiler.target>11</maven.compiler.target>
>>
>> <exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
>>       </properties>
>> </project>
>>
>> Can anyone help please?
>>
>> Thanks
>>
>> Vlad
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail:dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

RE: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

Posted by Eric Barboni <sk...@apache.org>.
Hi, did you try the 3.0.0-M7 or 2.22.0 version of surefire? 
They contains junit 5 fixes

Regards
Eric
-----Message d'origine-----
De : Jean-Marc Borer <jm...@gmail.com> 
Envoyé : mardi 20 septembre 2022 14:55
À : dev@netbeans.apache.org
Objet : Re: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

Hello Vlad,

I have this issue since a looonnnnngg time. It started with NB 12 (or even
11 not sure). I still don't know why it is failling.

Sorry not beining able to help you. Please file an issue on Github but make sure there not already one.

Best regards,

JM

On Sun, Sep 18, 2022 at 9:49 PM Vladimir Machat <ma...@gmail.com> wrote:

> I have been trying to figure out how to get JUnit 5 tests working 
> correctly in Netbeans 15.
>
> with maven-surefire-plugin version 2.19.1 and lower it works but with 
> versions starting 2.20 the Test Result window in Netbeans just says 
> 'No tests executed' even though in the Output window I can see that 
> they were executed.
>
> Running tests from command line - mvn surefire:test - works fine, 
> tests are executed.
>
> Setting trimStackTrace to false didn't help.
>
>
> Netbeans version 15
>
> Java tried with 8, 11, 17 and 18
>
> Maven tried with 3.8.6 and 3.8.4
>
> Junit 5 tried with almost all versions from 5.6.0 to 5.9.0
>
> OS Linux Manjaro
>
> pom:
>
> <?xml version="1.0" encoding="UTF-8"?> <project 
> xmlns="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">
>      <modelVersion>4.0.0</modelVersion>
>      <groupId>org.atrament</groupId>
>      <artifactId>TestJunit5</artifactId>
>      <version>0.1</version>
>      <packaging>jar</packaging>
>      <dependencies>
>          <dependency>
>              <groupId>org.junit.jupiter</groupId>
>              <artifactId>junit-jupiter</artifactId>
>              <version>5.9.0</version>
>              <scope>test</scope>
>              <type>jar</type>
>          </dependency>
>      </dependencies>
>      <build>
>          <plugins>
>              <plugin>
>                  <artifactId>maven-surefire-plugin</artifactId>
>                  <version>2.20</version>
>              </plugin>
>          </plugins>
>      </build>
>      <properties>
>          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>          <maven.compiler.source>11</maven.compiler.source>
>          <maven.compiler.target>11</maven.compiler.target>
>
> <exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
>      </properties>
> </project>
>
> Can anyone help please?
>
> Thanks
>
> Vlad
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: maven-surefire-plugin 2.20 and newer doesn't work with Test Result window

Posted by Jean-Marc Borer <jm...@gmail.com>.
Hello Vlad,

I have this issue since a looonnnnngg time. It started with NB 12 (or even
11 not sure). I still don't know why it is failling.

Sorry not beining able to help you. Please file an issue on Github but make
sure there not already one.

Best regards,

JM

On Sun, Sep 18, 2022 at 9:49 PM Vladimir Machat <ma...@gmail.com> wrote:

> I have been trying to figure out how to get JUnit 5 tests working
> correctly in Netbeans 15.
>
> with maven-surefire-plugin version 2.19.1 and lower it works but with
> versions starting 2.20 the Test Result window in Netbeans just says 'No
> tests executed' even though in the Output window I can see that they
> were executed.
>
> Running tests from command line - mvn surefire:test - works fine, tests
> are executed.
>
> Setting trimStackTrace to false didn't help.
>
>
> Netbeans version 15
>
> Java tried with 8, 11, 17 and 18
>
> Maven tried with 3.8.6 and 3.8.4
>
> Junit 5 tried with almost all versions from 5.6.0 to 5.9.0
>
> OS Linux Manjaro
>
> pom:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="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">
>      <modelVersion>4.0.0</modelVersion>
>      <groupId>org.atrament</groupId>
>      <artifactId>TestJunit5</artifactId>
>      <version>0.1</version>
>      <packaging>jar</packaging>
>      <dependencies>
>          <dependency>
>              <groupId>org.junit.jupiter</groupId>
>              <artifactId>junit-jupiter</artifactId>
>              <version>5.9.0</version>
>              <scope>test</scope>
>              <type>jar</type>
>          </dependency>
>      </dependencies>
>      <build>
>          <plugins>
>              <plugin>
>                  <artifactId>maven-surefire-plugin</artifactId>
>                  <version>2.20</version>
>              </plugin>
>          </plugins>
>      </build>
>      <properties>
>          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>          <maven.compiler.source>11</maven.compiler.source>
>          <maven.compiler.target>11</maven.compiler.target>
>
> <exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
>      </properties>
> </project>
>
> Can anyone help please?
>
> Thanks
>
> Vlad
>