android / android/android-test

Feature request: support dynamic sharding

Offen
#673 0 Kommentare 10 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
1.2k
Forks
342
Ø Merge
11 Std. 29 Min.
Gemergte PRs (30 T.)
2

Beschreibung

### Description

According to https://source.android.com/devices/tech/test_infra/tradefed/architecture/advanced/sharding, there is something called 'dynamic sharding', which makes it possible to spread all instrumented tests across all connected devices on the local host in a dynamic fashion. (To be frank, I am not sure what "trade federation" is, this page was just found via Google search.)

As far as I can see, currently the AndroidJUnitRunner only supports the usual fashion of sharding, which is having to explicitly specify the total number of shards, as well as the shard indices: https://developer.android.com/training/testing/junit-runner.html#sharding-tests

This is painful in a CI setup, as you have to keep track of the serial numbers of each of the connect devices, and you'd have to manually split up the individual shards by defining the shard indices. It'd be so more efficient to have support for dynamic sharding, so the runner would just spread out the tests as it prefers.

If this feature is already available and I just missed it, I would appreciate getting details on how I would specify dynamic sharding using `./gradlew` commands.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der bestehenden Sharding-Konfiguration von AndroidJUnitRunner und den `./gradlew`-Befehlen, die zu seinem Aufruf verwendet werden, und vergleiche sie anschließend mit dem verlinkten Verhalten des dynamischen Shardings. Die Aufgabe ist erledigt, wenn Tests auf verbundene Geräte verteilt werden können, ohne Shard-Anzahlen und -Indizes manuell zuzuweisen, und der Aufruf dokumentiert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
mobile, testing
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

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