When you use the java plugin, "test" is the task you run and the block 
configures it. In Android world, there are many test tasks (one per build 
variant) so the way to do it is this:

android {
    ...


    testOptions.unitTests.all {
        testLogging {
            events "passed", "skipped", "failed", "standardOut", "standardError"
        }
    }
}


On Monday, July 13, 2015 at 10:49:50 PM UTC+1, Colin Madere wrote:
>
> I'm doing this as of v1.2.3 of the plugin:
>
> test {
>
>   afterTest { descriptor, result ->
>     println "TEST ${getSimpleName(descriptor.className)}.${descriptor.name} - 
> Result: ${result.resultType}"
>   }
>
> }
>
>
> def getSimpleName(def fqClassname) {
>     return fqClassname.substring(fqClassname.lastIndexOf('.')+1)
> }
>
>
> Not sure if/why the standard Java plugin way isn't working?
>
> On Saturday, July 11, 2015 at 12:48:30 AM UTC-7, Tomáš Procházka wrote:
>>
>> | would like to force gradle to write unit tests output directly to 
>> console, not only to HTML
>>
>> In normal java plugin it should works with this
>>
>> test {
>>     testLogging {
>>         events "passed", "skipped", "failed", "standardOut", "standardError"
>>     }}
>>
>> But with android plugin not.
>> How to do the same with Android?
>>
>> Related question:
>>
>> http://stackoverflow.com/questions/28832144/how-to-turn-on-console-output-in-android-unit-tests#
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to