Cannot run individual instrumented tests
See original GitHub issueUsing gradle to try to run an individual instrumented test method will instead run all tests within that method’s class.
E.g. running ./gradlew clean connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=stupidSampleGradleProject.StupidConnectedTest#stupidConnectedPassTest
will run all tests in the StupidConnectedTest
class, rather than only the specified one. (See https://github.com/mannodermaus/android-junit5/issues/174 for the approximate build.gradle and sample test file configuration I’m using).
I verified that this was not an issue when running equivalent JUnit 4 instrumentation tests.
Let me know if you need more details to reproduce!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Can no longer run individual instrumented tests in Android ...
In my experience, Android Studio 3.x was still able to run individual tests (no matter if individual-test-method or individual-test-class).
Read more >Test from the command line | Android Developers
Run tests on a module; Run tests on a build variant; Run specific test methods or classes; Multi-module reports for instrumented tests.
Read more >Missing Run Test in Android Studio - DEV Community
The above steps run all instrumented tests under the specify package. If you want to run test in specify class, just choose Class...
Read more >Easy Instrumented Tests (UI Tests) for Android in 2021
Instrumented tests are tests that run on physical devices and emulators, and they can take advantage of the Android framework APIs and supporting...
Read more >Test module fails to run in studio, succeeds from cmd line
This method works in Java PsiElement because there's only one top-level class in a file but doesn't in Kotlin file. I couldn't find...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released in 1.2.0!
Thanks for confirming! I’d like to vet your other issue as well before committing to a full release, so please stay tuned for more once I get another time slot.