android-junit5
android-junit5 copied to clipboard
Tests with method parameters do not have context menu in test results window
Probably related to #199.
Steps to reproduce:
- Run whole instrumented class test that has at least one test method with parameters (such as
ActivityOneTest
) - Attempt to right click on the tests in test results window
Test without parameter will display normal context menu:
However, right clicking on test with method parameters will just yield "Nothing here" popup:
As you're mentioning here, I also believe that this is related to #199 via the fact that ADB and Android Studio do not acknowledge methods with parameters just yet.
For some context, our instrumentation library installs a custom "Runner Builder" into the test execution pipeline and detects all JUnit 5 stuff. It's connected to a org.junit.runner.Runner
implementation with a run()
method. That method is not called by the Android instrumentation if the single method contains parameters. I do not know of a way to force it to detect these methods, unfortunately. We'll have to resort to running entire test classes as the next-best point of execution until this is resolved.
I believe this would be useful information to mention in the Scenario as Parameter
section here, as I've just spent some time trying to figure out why the example wasn't working.