android-junit5 icon indicating copy to clipboard operation
android-junit5 copied to clipboard

Tests with method parameters do not have context menu in test results window

Open matejdro opened this issue 5 years ago • 2 comments

Probably related to #199.

Steps to reproduce:

  1. Run whole instrumented class test that has at least one test method with parameters (such as ActivityOneTest)
  2. Attempt to right click on the tests in test results window

Test without parameter will display normal context menu: image

However, right clicking on test with method parameters will just yield "Nothing here" popup: image

matejdro avatar Nov 28 '19 14:11 matejdro

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.

mannodermaus avatar Feb 01 '20 19:02 mannodermaus

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.

bramhaag avatar May 03 '21 21:05 bramhaag