How to add extra test runner parameter in Android Studio 2.3 instrumented tests

1.2k views Asked by At

In Android Studio 2.3 there is no field that allows user to setup additional test runner parameters in Edit configuration window for Android Instrumented Tests, however this option was present in 2.2.x version.

Is there any other way in new AS (except from running test manually from command line) to add extra runner parameters to espresso tests?

edit:

I've filled an issue on bug tracker:

https://code.google.com/p/android/issues/detail?id=231797&q=instrumentation&sort=-opened&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened

1

There are 1 answers

1
Faraz On

There is no way to do this via that window, because it no longer exists.

An alternative is to subclass the Test Runner, and pass params there. Here is an example using Robolectric: https://www.snip2code.com/Snippet/90320/An-extension-of-RobolectricTestRunner-th