android / android/android-test
Test orchestrator doesn't restart the app process when running a single parametrized test
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### 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
Contributor guide
Research direction
Start by reproducing the issue with the linked rciovati/orchestrator-bug project, running one parametrized test from Android Studio and then the full ExampleInstrumentedTest class. Review the AndroidX Test dependencies in app/build.gradle lines 43-53 and compare the process behavior in both cases. Done means a single parametrized test restarts the app process between parameter values as the expected log shows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100