[ 
https://issues.apache.org/jira/browse/NETBEANS-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantinos Raptis updated NETBEANS-4332:
------------------------------------------
    Description: 
I am not sure if this is a bug or a configuration issue, but I face a weird 
behaviour. When running a test that print to stdout, the "Test Results" pane 
text output area remains empty if the test result is success. On the contrary, 
when a test is failing the stdout String text is printed normally in "Test 
Results" pane text output area.

pom.xml
{code:java}
<?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>com.mycompany</groupId>
    <artifactId>mavenproject1</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <dependencies>
        <dependency>
            <artifactId>junit</artifactId>
            <groupId>junit</groupId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>
</project>
{code}
A simple class that has a method, which prints a message
{code:java}
public class HelloWorld {

    public String printHelloMessage() {
        return "Hello";
    }
}
{code}
Another simple test class
{code:java}
public class HelloWorldTest {  

    @Test
    public void testPrintHelloMessage() {
        System.out.println("Print out a Message");
        HelloWorld instance = new HelloWorld();
        String expResult = "Hello";
        String result = instance.printHelloMessage();
        assertEquals(expResult, result);
    }
}
{code}
 

  was:
I am not sure if this is a bug or a configuration issue, but I face a weird 
behaviour. When running a test that print to stdout, the "Test Results" pane 
text output area remains empty if the test result is success. On the contrary, 
when a test is failing the stdout String text is printed normally in "Test 
Results" pane text output area.

pom.xml
{code:java}
<?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>com.mycompany</groupId>
    <artifactId>mavenproject1</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <dependencies>
        <dependency>
            <artifactId>junit</artifactId>
            <groupId>junit</groupId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>
</project>
{code}
A simple class that has a method, which prints a message
{code:java}
public class HelloWorld {

    public String printHelloMessage() {
        return "Hello";
    }
}
{code}
Another simple test class
{code:java}
public class HelloWorldTest {  

    @Test
    public void testPrintHelloMessage() {
        System.out.println("Print out a Message");
        HelloWorld instance = new HelloWorld();
        String expResult = "Hello";
        String result = instance.printHelloMessage();
        assertEquals(expResult, result);
  }
}
{code}
 


> Maven Projects: The "Test Results" pane test output text are get populated 
> with stdout only when test fail
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-4332
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4332
>             Project: NetBeans
>          Issue Type: Bug
>          Components: projects - Maven
>    Affects Versions: 11.3
>         Environment: Netbeans 11.3
> Maven 3.6.3
> JUnit 4.12
> OpenJDK 11.0.7.10
> Windows 10
>            Reporter: Konstantinos Raptis
>            Priority: Minor
>
> I am not sure if this is a bug or a configuration issue, but I face a weird 
> behaviour. When running a test that print to stdout, the "Test Results" pane 
> text output area remains empty if the test result is success. On the 
> contrary, when a test is failing the stdout String text is printed normally 
> in "Test Results" pane text output area.
> pom.xml
> {code:java}
> <?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>com.mycompany</groupId>
>     <artifactId>mavenproject1</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <packaging>jar</packaging>
>     <dependencies>
>         <dependency>
>             <artifactId>junit</artifactId>
>             <groupId>junit</groupId>
>             <version>4.12</version>
>             <scope>test</scope>
>         </dependency>
>     </dependencies>
>     <properties>
>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>         <maven.compiler.source>11</maven.compiler.source>
>         <maven.compiler.target>11</maven.compiler.target>
>     </properties>
> </project>
> {code}
> A simple class that has a method, which prints a message
> {code:java}
> public class HelloWorld {
>     public String printHelloMessage() {
>         return "Hello";
>     }
> }
> {code}
> Another simple test class
> {code:java}
> public class HelloWorldTest {  
>     @Test
>     public void testPrintHelloMessage() {
>         System.out.println("Print out a Message");
>         HelloWorld instance = new HelloWorld();
>         String expResult = "Hello";
>         String result = instance.printHelloMessage();
>         assertEquals(expResult, result);
>     }
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to