android / android/testing-samples

Problems running tests on multidex app on Kitkat emulator after updating gradle plugin to 3.1.1

Offen
#179 12 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
9.3k
Forks
3.6k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello,

I've stumbled upon an issue after updating gradle plugin to 3.1.1.

I've tried to replicate on BasicSample (https://github.com/googlesamples/android-testing/tree/master/ui/espresso/BasicSample) project and got something very similar to my project's errors. Please take a look at 3 subsequent commits on the forked repo.

1. https://github.com/fada21/android-testing/commit/13488879e62e07349f204fc969642c25fe5af089
Working state of my project based on BasicSample. With not too many changes on top of BasicSample tests on Kitkat and Oreo emulator pass. All working fine.

2. https://github.com/fada21/android-testing/commit/8d314542c1823958a4dde7bac0a129bdcf9bcf02
After update to gradle build tool to 3.1.1 with few necessary changes tests on Kitkat emulator fail when they pass with no problems on Oreo. I think that is relevant console output part
```
> Task :app:compileDebugAndroidTestJavaWithJavac
Note: /home/fada21/Projects/android/android-testing/ui/espresso/BasicSample/app/src/androidTest/java/com/example/android/testing/espresso/BasicSample/ChangeTextBehaviorTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Warning: The rule `-keep public class *extends java.lang.annotation.Annotation {
*;
}` uses extends but actually matches implements.
Starting 0 tests on Nexus_4_API_19(AVD) - 4.4.2

com.android.builder.testing.ConnectedDevice > No tests found.[Nexus_4_API_19(AVD) - 4.4.2] 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).
```

3. https://github.com/fada21/android-testing/commit/edc2613da4784002d04561578ca9c3de45ee616d
After disabling multidex test pass on both emulators

My ci pipelines fail after update and I can't disable multidex. Any ideas? Should I report that to tools team?

Cheers,
Lukasz

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere das Problem im BasicSample-Projekt unter Verwendung der drei verknüpften Commits, des Updates auf Gradle plugin 3.1.1, von multidex sowie von KitKat- und Oreo-Emulatoren. Beginne mit der Ausgabe des Tests auf dem verbundenen Gerät, die „No tests found“ anzeigt; als abgeschlossen gilt die Aufgabe, wenn die Tests sowohl auf KitKat mit aktiviertem multidex als auch auf Oreo erfolgreich ausgeführt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
mobile-dev, testing
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.