android / android/android-test
Running all tests in specific package with isolated=false doesn't working properly
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
With isolated=true (default behavior of Orchestrator), '-e package some.package' options seems to work.
But Orchestrator will run all tests in application when give isolated=false options.
### Steps to Reproduce
1. Add 'isolated' options into gradle `testInstrumentationRunnerArguments isolated: 'false'`
2. Run **Tests in 'some.pacakge'** in Android Studio
or
1. Run this shell command
```
adb shell 'CLASSPATH=$(pm path androidx.test.services) app_process / \
androidx.test.services.shellexecutor.ShellMain am instrument -r -w -e \
targetInstrumentation com.example.android.testing.androidtestorchestratorsample.test/androidx.test.runner.AndroidJUnitRunner \
-e isolated false -e clearPackageData true -e package nottest.intended -e debug false \
androidx.test.orchestrator/androidx.test.orchestrator.AndroidTestOrchestrator'
```
### Expected Results
1. Expected to run tests in specific package

### Actual Results
1. Run all tests in application

### AndroidX Test and Android OS Versions
* Device: Samsung S20+ (SM-G986N) with Android 10
* Dependencies version: 1.3.0, 1.4.0-alpha05
* Android Studio: 4.1.2
### Link to a public git repo demonstrating the problem:
* https://github.com/android/testing-samples/tree/main/runner/AndroidTestOrchestratorSample with [patch](https://gist.github.com/WindSekirun/828d63f387aec5065f972201b3c2977f)
* Or, copy-paste tests into another package
Contributor guide
Assessment
This issue has not been assessed yet.