This message was deleted.
# android
s
This message was deleted.
d
Was just about to look at 7.2 for test fixture support, so I’d be curious how you’re enabling test code coverage to see if I see the same thing. Checking these sorts of items are some of the first smoke tests I do before I go further with updates like adding test fixtures.
t
Copy code
buildTypes {
    named("debug") {
        isTestCoverageEnabled =
            // Don't run build time coverage instrumentation locally to avoid transform time
            !engBuild

                // Don't run build time coverage instrumentation when we know we are going to run JVM tests
                // Mocking of types mixed with build instrumented coverage and jvm agent coverage blows up
                && !gradle.startParameter.taskNames.contains("unitTestSuite")

                // Don't run build time coverage instrumentation when we know we are publishing.
                // Downstream consumers will break if trying to do their own build time coverage instrumentation.
                && !gradle.startParameter.taskNames.contains("publishAllPublicationsToNexusReleaseRepository")

                // Only run in CI when we are prepping test APKs
                && gradle.startParameter.taskNames.any { it.contains("androidTest", ignoreCase = true) }
    }
}
that's where I have landed so far. new relic is tied to the engBuild for me
tldr build time coverage transforms are a PITA
though at this point I may just flip it and require a CLI param to set it to true
d
Are you running into this on
connectedAndroidTest
? At least that’s how I’m reading the above block. If that’s the case, I’m afraid I won’t be of a whole lot of help on this one as we’re just doing it on
test
at this point :/
t
yeah so I have to disable that for the normal test runs. and I run it when building the android test apks. and just confirmed it is only an issue when I have both new relic and code coverage turned on. I am going to file an issue with them given their plugin has always been a dumpster fire for me
for our unit test coverage I apply the jacoco plugin as well as a custom plugin to setup all the android specifics.
d
is unit test coverage failing or just android test?
t
neither, it is failing to do the bundle tasks.
Copy code
:app:packageQaDebugBundle
only guess I have right now is that newrelic is skipping something it should be copying or is using transform api's wrong or something along those lines.
tests all ran fine it was just the final bundles that I do before uploading to internal app share and all that
though keep in mind I don't actually do anything with my androidTest coverage reports. only the unit test reports. (don't want to create an accidental incentive on writing e2e style tests to pump the numbers)
💯 1
I just make them all available so you can check it. but the PR checks ignore the androidTest exec data