Hi Peter,
I had the chance to play around with your new test logging configuration.
First of all, this is great stuff. This will be a great pleasure and
convenience for many people running their tests with Gradle.
I have a couple of questions/comments:
1.) The events(Object... events) is not additive but replaces existing
values. This is different to the behavior in other parts of the Gradle DSL.
It confused me a little bit when I used the events method together with
some of the alternative configure methods (e.g. showStandardStreams).
2.) What about the message property of the exception object?
Using it would enable something like:
org.gradle.PersonTest > canConstructAPersonWithAName FAILED
org.junit.ComparisonFailure: expected:<Larry[s]> but was:<Larry[]>
vs.
org.gradle.PersonTest > canConstructAPersonWithAName FAILED
org.junit.ComparisonFailure: expected:<Larry[s]> but was:<Larry[]>
at
org.gradle.PersonTest.canConstructAPersonWithAName(PersonTest.java:11)
3.) For learning about why an assertEquals method has failed, I need to
configure the following:
showExceptions true
exceptionFormat 'FULL'
events 'FAILED'
stackTraceFilters 'ENTRY_POINT'
What about making this more convenient? Would it help to display the
e.message? In this case just setting
events 'FAILED'
would give the information I want in this very common use case.
Hans
--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleware
CEO, Gradleware - Gradle Training, Support, Consulting
http://www.gradleware.com