Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add console logging to integration tests #33

Open
zsoltk opened this issue Jan 16, 2016 · 1 comment
Open

Add console logging to integration tests #33

zsoltk opened this issue Jan 16, 2016 · 1 comment

Comments

@zsoltk
Copy link
Owner

zsoltk commented Jan 16, 2016

This works for unit tests, but has no effect on instrumentation tests:

testOptions.unitTests.all {
    testLogging {
        events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
        outputs.upToDateWhen { false }
        showStandardStreams = true
        exceptionFormat "full"
    }
}

This should do the job:

tasks.withType(com.android.build.gradle.internal.tasks.AndroidTestTask) { task ->
    task.doFirst {
        logging.level = LogLevel.INFO
    }

    task.doLast {
        logging.level = LogLevel.LIFECYCLE
    }
}

Except it doesn't. It seems to have zero effect on instrumentation tests, still only failures are logged.

When run with the --info switch, the passed tests are there, so the above should be working, too. What's wrong here? Anyone knows how to solve this?

@jaredsburrows
Copy link

@zsoltk The first one is for unit tests and works fine. The second does not work at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants