question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run individual instrumented tests

See original GitHub issue

Using 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mannodermauscommented, Nov 20, 2019

Released in 1.2.0!

1reaction
mannodermauscommented, Nov 12, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found