android - How to turn on robolectric logging -


i need simple way robolectric 3.0 turn on logging. want see output robolectric, not tests. tried off web not working.

where stick this?

robolectric.logging.enabled = true 

i tried following:

in robolectric.properties file in test/java/res

in robolectric.properties file in test/java/resources

in robolectric.properties file in test/res

in robolectric.properties file in test/resources

in gradle:

afterevaluate {     project.tasks.withtype(test) {         systemproperties.put('robolectric.logging.enable', 'true')     } } 

in gradle:

tasks.withtype(test) {     testlogging.exceptionformat = 'full'     systemproperties.put('robolectric.logging.enable', 'true') } 

you can add tests:

@before public void init() {      shadowlog.stream = system.out; } 

then use: gradle test -i

source: unable log.d or output robolectrict + gradle

or add in build.gradle:

tasks.withtype(test) {       systemproperty "robolectric.logging", "stdout"  }  

source: https://github.com/studyplus/studyplus-android-sdk/blob/master/studyplusandroidsdk/build.gradle#l41


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -