Multiple annotations passed in am command not working as expected
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- android, java
- Domain
- mobile-dev, testing
Research direction
Start at the AndroidJUnitRunner entry point and reproduce the issue with the supplied adb shell am instrument command using two annotations. Compare the single-annotation and multiple-annotation runs; done means the multiple-annotation command runs only tests carrying either specified annotation rather than the full suite.
Written by the indexing model from the issue text.
Description
Description
If we pass multiple annotations in the am command, it runs all the tests instead of running only the tests with annotation.
Espresso documentation for multiple annotations - https://developer.android.com/reference/androidx/test/runner/AndroidJUnitRunner
Steps to Reproduce
- Add annotations to your test functions ( @Annotation1, @Annotation2 )
- Run the am instrument command
adb shell am instrument -w -e annotation com.android.foo.Annotation1,com.android.foo.Annotation2 com.android.foo/androidx.test.runner.AndroidJUnitRunner
Expected Results
It should only run functions with the annotations. So if have 10 tests in total and we added annotation to only 2 , it should run 2/9 tests
Actual Results
It runs all the tests in the testsuite
AndroidX Test and Android OS Versions
com.android.foo/androidx.test.runner.AndroidJUnitRunner`
Android OS - 13
Note
This works fine with single annotation param
adb shell am instrument -w -e annotation com.android.foo.Annotation1 com.android.foo/androidx.test.runner.AndroidJUnitRunner
Link to a public git repo demonstrating the problem:
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/android-test
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
android/android-test#681 · 2 comments · 1 reaction ·
-
ξεκσνδξδ Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2499 ·
-
ησξξσ Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2498 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
android/android-test#2473 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
android/android-test#2461 · 6 comments · 4 reactions ·
All issues in android/android-test
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100