Search code examples
testingconsolegradle

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


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

And not wait until tests are done to look at the test reports ( that are only generated when tests are completed, so I can't "tail -f" anything while tests are running )


Solution

  • You could run Gradle with INFO logging level on the command line. It'll show you the result of each test while they are running. Downside is that you will get far more output for other tasks also.

    gradle test -i