IntelliJ Idea, Gradle Junit Test - Output Shows Blank Lines
I am running Idea 2020.1.3 Ultimate.
I have created a Gradle project with Gradle 6.5.1 and Junit 5.6.2.
When running a simple test that only prints output to the screen, I see that after each line, Idea adds a blank line. This is making analyzing the results very difficult, since it doubles and triples the output.
This issue doesn't restore when running Gradle from command line.
It does restore when running with TestNG instead of JUnit.
It was also restored with JUnit 4 versions.
Any ideas?
Test code:
@Test
public void testDummy(){
System.out.println("line1");
System.out.println("line2");
System.out.println("line3");
}
Output:
Testing started at 13:29 ...
> Task :compileJava UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
line1
line2
line3
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 839ms
3 actionable tasks: 1 executed, 2 up-to-date
13:29:19: Task execution finished ':test --tests "org.example.tests.DummyTest.testDummy"'.
build.gradle file:
plugins {
id 'java'
id 'idea'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.6.2'
}
test {
useJUnitPlatform()
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
Please sign in to leave a comment.
Hi. The issue should be solved in 2020.3: https://youtrack.jetbrains.com/issue/IDEA-216145