On 21/05/2011, at 2:21 AM, phil swenson wrote: > When I run gradle test I get something like this as an output: > > Test com.softwareag.bas.plugins.LocalizationPluginTest FAILED > 5 tests completed, 1 failure > > FAILURE: Build failed with an exception. > > * What went wrong: > Execution failed for task ':bas-plugins-localization:test'. > Cause: There were failing tests. See the report at > /Users/phil/dev/sag/bas_core/trunk/modules/plugins-localization/build/reports/tests. > > > So to me this it's ideal..... the actual problem isn't printed to the > console. And I now have to cd into the > /Users/phil/dev/sag/bas_core/trunk/modules/plugins-localization/build/reports/tests > and type "open index.html" > > Has anyone extended the testing plugin to provide something that makes > it easier to see the test results? > > If not I'm thinking of writing a plugin that simply views the reports.
We want to change the console output so that it includes some information about the actual failures, so you don't need to look at the report. This will also allow us to change the report so that it is not generated by default, which would make builds faster. Would you be interested in making this change to Gradle, rather than writing a separate plugin, so that it becomes the default behaviour? It would involve a change to org.gradle.api.internal.tasks.testing.results.TestSummaryListener to print out some more stuff on failure. All the information should already be available in the TestResult objects it receives. > You run the test task and then if you want to view the report, you > then run a task such as "gradle viewTestReport" This might be useful, as well. However, if we did this, it would be nice if it worked for all reports that Gradle produces, rather than just the test report. -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
