-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run individual instrumented tests with method parameters #199
Comments
I'm not familiar with the syntax being used in that example file to have parameters in an |
Here is example test:
I've also noticed that I cannot reproduce it every time. |
As mentioned in the referenced issue, ADB and/or Android Studio seem to discard method signatures with parameters when submitting singular Edit: Another thought I'd like to leave for further reference: The fact that |
I was able to conclude a deep and long investigation (don't worry though, it didn't take 1.5 years!). My previous assumption turned out to be semi-correct: The instrumentation discards any test method with parameters because its name doesn't match AndroidX's internal method filter. It works for parameterized tests because we happen to trigger an exemption from a different piece of the AndroidX code, wherein numerical suffixes are understood by the filters. This means that I'll try to tackle this for the upcoming 1.3.0 release of the instrumentation runner library. A note for my future self: Research resultsBeforeThe problem is seen in the first block, "Test with parameter". The final log says that the
|
Released in instrumentation 1.3.0! Please note that the new version requires JUnit 5.8.0 |
When attempting to run individual instrumented method that has parameters, IDE will just error out with "No tests found"
Example such test:
android-junit5/instrumentation/sample/src/androidTest/kotlin/de/mannodermaus/sample/ActivityOneTest.kt
Line 30 in a2f9034
The text was updated successfully, but these errors were encountered: