[
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}
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
com.mycompany
mavenproject1
1.0-SNAPSHOT
jar
junit
junit
4.12
test
UTF-8
11
11
{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}
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
com.mycompany
mavenproject1
1.0-SNAPSHOT
jar
junit
junit
4.12
test
UTF-8
11
11
{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}
>
> 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
> com.mycompany
> mavenproject1
> 1.0-SNAPSHOT
> jar
>
>
> junit
> junit
> 4.12
> test
>
>
>
> UTF-8
> 11
> 11
>
>
> {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