When unit tests fail with a Gradle build in CI, you don't get enough information about the test cases that failed.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spring-boot-project:spring-boot-test-autoconfigure:test'.
> There were failing tests. See the report at: file:///tmp/build/6da1d659/git-repo/spring-boot-project/spring-boot-test-autoconfigure/build/reports/tests/test/index.html

The build output contains words like FAIL and FAILED, along with error messages and stack traces, during normal execution. This makes it difficult to identify the true test failures.

It would be better if the build output contained a list of failed test cases.

Comment From: philwebb

I know we have the option of Gradle enterprise, but it would also be nice if we should show something directly on the CI

Comment From: dreis2211

For people like me it also helps with contributing and seeing errors locally. The build output of Gradle is unfortunately a step backwards if I may say so. (Build times outweigh that though 😉 )

Comment From: wilkinsona

@dreis2211 Is there something missing from the HTML reports or is it that you prefer failure information appearing in the console?

Comment From: dreis2211

The beauty of Maven + Surefire was its build output on the console. While the HTML report is there, it requires an additional step instead of seeing at first glance what needs to be looked at. Maybe it's the parallelism that scrambles the output additionally that makes it harder for me. Maybe it's just me and it's a matter of personal taste, in which case ignore me ;)

Comment From: wilkinsona

The parallelism certainly complicates things (a problem that Maven has as well if parallelism is enabled).

When the build fails, you should get a summary at the end of the output with links to the HTML reports for every test task that failed. When working locally, I find opening those more productive than scrolling back up through the console output (with or without the parallelism problem) to find the failures.

For me, the problem with CI is that those reports aren't accessible. Gradle Enterprise provides a nice way of accessing the same information but it does add a few hops.

Comment From: dreis2211

Maybe it's just the hops that I need to get accustomed to then.