android / android/android-test
Test orchestrator doesn't restart the app process when running a single parametrized test
- Lingua principale
- Java
- Stelle
- 1.2k
- Fork
- 342
- Merge medio
- 11h 29m
- PR unite (30g)
- 2
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il problema con il progetto collegato rciovati/orchestrator-bug, eseguendo un test parametrizzato da Android Studio e poi l’intera classe ExampleInstrumentedTest. Esamina le dipendenze AndroidX Test in app/build.gradle alle righe 43-53 e confronta il comportamento del processo in entrambi i casi. Il lavoro è completato quando un singolo test parametrizzato riavvia il processo dell’app tra i valori dei parametri, come mostra il log previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, java
- Ambito
- mobile-dev, testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100