android / android/android-test

Test orchestrator doesn't restart the app process when running a single parametrized test

Offen
#799 0 Kommentare 2 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

When using parametrized tests, it seems that the orchestator doesn't restart the process when running a single test (i.e from Android Studio). When running the entire test class it works as intended.

### Steps to Reproduce

- `git clone git@github.com:rciovati/orchestrator-bug.git`
- Filter the logcat for `asdf`
- From Android Studio, run one of the two tests in `ExampleInstrumentedTest`

### Expected Results

```
D/asdf: Application#onCreate
D/asdf: test one... value: false
D/asdf: Application#onCreate
D/asdf: test one... value: true
```

### Actual Results

```
D/asdf: Application#onCreate
D/asdf: test one... value: false
D/asdf: test one... value: true
```

## Notes

If you run the entire class you'll see:

```
D/asdf: Application#onCreate
D/asdf: Application#onCreate
D/asdf: test one... value: false
D/asdf: Application#onCreate
D/asdf: test two... value: false
D/asdf: Application#onCreate
D/asdf: test one... value: true
D/asdf: Application#onCreate
D/asdf: test two... value: true
```
which is the intended behaviour.

### AndroidX Test and Android OS Versions

See the dependencies here: https://github.com/rciovati/orchestrator-bug/blob/main/app/build.gradle#L43-L53

### Link to a public git repo demonstrating the problem:

https://github.com/rciovati/orchestrator-bug

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, das Problem mit dem verknüpften Projekt rciovati/orchestrator-bug zu reproduzieren, indem du einen parametrisierten Test in Android Studio und anschließend die vollständige Klasse ExampleInstrumentedTest ausführst. Überprüfe die AndroidX Test-Abhängigkeiten in app/build.gradle in den Zeilen 43-53 und vergleiche das Prozessverhalten in beiden Fällen. Erledigt ist die Aufgabe, wenn ein einzelner parametrisierter Test den App-Prozess zwischen den Parameterwerten neu startet, wie das erwartete Log zeigt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, 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.