Gradle: How to Display Test Results in the Console in Real Time?

后端 未结 16 1074
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 00:39

I would like to see test results ( system.out/err, log messages from components being tested ) as they run in the same console I run:

gradle test
         


        
16条回答
  •  旧时难觅i
    2020-11-28 01:20

    If you are using jupiter and none of the answers work, consider verifying it is setup correctly:

    test {
        useJUnitPlatform()
        outputs.upToDateWhen { false }
    }
    
    dependencies {
        testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
        testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
    }
    

    And then try the accepted answers

提交回复
热议问题