0.8.5 & 0.8.6 causes 'No tests found'

43 views
Skip to first unread message

LethalMaus

unread,
Nov 26, 2020, 7:46:54 AM11/26/20
to JaCoCo and EclEmma Users
Hi, when I bump up my jacoco version from 0.8.4 to either 0.8.5 or 0.8.6, my tests fail to run and it claims to find 'no tests'. Has anyone else experienced this before?

Marc Hoffmann

unread,
Nov 26, 2020, 10:47:47 AM11/26/20
to JaCoCo and EclEmma Users
Is there any log output or error messages on the console? 

On 26. Nov 2020, at 13:46, LethalMaus <descripti...@gmail.com> wrote:

Hi, when I bump up my jacoco version from 0.8.4 to either 0.8.5 or 0.8.6, my tests fail to run and it claims to find 'no tests'. Has anyone else experienced this before?

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/e62d0c5c-1e87-494d-a804-8b75226931ffn%40googlegroups.com.

LethalMaus

unread,
Nov 27, 2020, 2:44:42 AM11/27/20
to JaCoCo and EclEmma Users
Hi, thanks for the quick response. Below is as much information as I can give for the moment, if more is needed just ask.
I have also searched everywhere for information about this (and similar problems which are now resolved)

> Task :app:connectedDevelopmentDebugAndroidTest
Starting 0 tests on SM-G970F - 10
Tests on SM-G970F - 10 failed: Instrumentation run failed due to 'Process crashed.'

com.android.build.gradle.internal.testing.ConnectedDevice > No tests found.[SM-G970F - 10] FAILED 
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).

> Task :app:connectedDevelopmentDebugAndroidTest FAILED

This is the output when bumping the version up. Everything works fine when the version is 0.8.4 or less.
In case this helps, here is my system setup:
Windows 10
Java 15 (tried with Java 12 & Java 8 too)
Gradle 6.7 (Tried with 6.6, 6.5 & 6.3)

In case this helps too, here are parts of my project setup (unfortunately I can't share everything). It is a single module with different flavors
compileSdkVersion 30
buildToolsVersion "30.0.0" 
...
buildTypes {
    debug {
        testCoverageEnabled true
    }
}
...
androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
androidTestImplementation "androidx.test.espresso:espresso-contrib:3.3.0"
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-web:3.3.0'
androidTestImplementation "androidx.test.ext:junit:1.1.2"
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:4.9.0'

As said my tests run fine without Jacoco or on a lower version so it is definitely related (just may not be the cause) however I have tried a lot of different things like changing the java version or gradle and even frameworks within my test code (turns out I was actually using legacy libraries) but as far as I can see everything is up to date and I tend to stick to either googles or androids documentation when developing.

LethalMaus

unread,
Nov 27, 2020, 2:46:41 AM11/27/20
to JaCoCo and EclEmma Users
As well as to how my tests are setup
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class SettingsTest : BaseTest() {

@Test
fun testSettings() {
...
}

Nothing out of the ordinary and the test runner is correct. As said, the tests run fine either without Jacoco or on a lower version

Marc Hoffmann

unread,
Nov 27, 2020, 11:47:25 AM11/27/20
to jac...@googlegroups.com
Hi,

what is the excution environment for the testes?

> Tests on SM-G970F - 10 failed: Instrumentation run failed due to 'Process crashed.'

Is there any output available from "SM-G970F”? Looks like the problem happens on that runtime environment.

Regards,
-marc






LethalMaus

unread,
Nov 27, 2020, 11:53:35 AM11/27/20
to jac...@googlegroups.com
Im not sure what you mean by execution environment, do you mean the runner? If so then AndroidJUnit4

You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/oEzJKjxVfzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/243A6F49-6188-4E23-8BB0-81B75B709928%40mountainminds.com.

Evgeny Mandrikov

unread,
Nov 27, 2020, 11:57:54 AM11/27/20
to JaCoCo and EclEmma Users
Hi,

Since it is about Android and upgrade of JaCoCo from 0.8.4 to 0.8.5,
I believe that you'll find answer in https://github.com/jacoco/jacoco/issues/968


Regards,
Evgeny

LethalMaus

unread,
Dec 2, 2020, 10:19:14 AM12/2/20
to JaCoCo and EclEmma Users
This worked like a charm thank you. I now face the issue of trying to exclude classes from the report, but I will first see if someone else has reported this, if not I will open a new discussion
Reply all
Reply to author
Forward
0 new messages