Fixed
Status Update
Comments
ar...@google.com <ar...@google.com> #2
We could not reproduce the issue with the given sample project on Nexus 5 device with Android 5 version and on Nexus 5X with Android 7 version.
Below are the steps we followed for reproducing the issue.
1. Download the project from github.
2. Launch Android Studio and import the project.
3. In the project pane on Left side of Android Studio, go to app->java->com.extension.runnercrashapp.
4. Right click on ExampleInstrumentedTest and select "Run 'ExampleInstrumentedTest' ".
Can you provide the below requested information to better understand the issue:
Android build
Which Android build are you using? (e.g. KVT49L)
Device used
Which device did you use to reproduce this issue?
Steps to reproduce
Please let us know whether we are missing any steps other than mentioned above.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What do you expect to occur?
Current output
What do you see instead?
Below are the steps we followed for reproducing the issue.
1. Download the project from github.
2. Launch Android Studio and import the project.
3. In the project pane on Left side of Android Studio, go to app->java->com.extension.runnercrashapp.
4. Right click on ExampleInstrumentedTest and select "Run 'ExampleInstrumentedTest' ".
Can you provide the below requested information to better understand the issue:
Android build
Which Android build are you using? (e.g. KVT49L)
Device used
Which device did you use to reproduce this issue?
Steps to reproduce
Please let us know whether we are missing any steps other than mentioned above.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What do you expect to occur?
Current output
What do you see instead?
ma...@tomtom.com <ma...@tomtom.com> #3
Android build:
NRD90MD
Device used:
Samsung Galaxy S6
Steps to reproduce:
Sorry I wasn't clear enough. Below the steps:
Below are the steps we followed for reproducing the issue.
1. Download the project from github.
2. Launch Android Studio and import the project.
3. In the toolbar go to Edit configurations
4. Create new configuration with "Android Instrumented Tests" type
5. Set "app" as module and check "All in Module" (this is important step)
6. Click on the green arrow and start tests
Android Studio should then start instrumentation tests with following command:
adb shell am instrument -w -r -e debug false com.extension.runnercrashapp.test/android.support.test.runner.AndroidJUnitRunner
Frequency is 10/10
Expected output:
1 test should be started and pass
Current output:
No tests were found and crash mentioned in first comment
NRD90MD
Device used:
Samsung Galaxy S6
Steps to reproduce:
Sorry I wasn't clear enough. Below the steps:
Below are the steps we followed for reproducing the issue.
1. Download the project from github.
2. Launch Android Studio and import the project.
3. In the toolbar go to Edit configurations
4. Create new configuration with "Android Instrumented Tests" type
5. Set "app" as module and check "All in Module" (this is important step)
6. Click on the green arrow and start tests
Android Studio should then start instrumentation tests with following command:
adb shell am instrument -w -r -e debug false com.extension.runnercrashapp.test/android.support.test.runner.AndroidJUnitRunner
Frequency is 10/10
Expected output:
1 test should be started and pass
Current output:
No tests were found and crash mentioned in first comment
ar...@google.com <ar...@google.com> #4
We are getting the below output when we follow the instructions given in comment #3 .
$ adb shell am instrument -w -r -e debug false com.extension.runnercrashapp.test/android.support.test.runner.AndroidJUnitRunner
Client not ready yet..
Started running tests
Tests ran to completion.
Empty test suite.
Can you let us know whether we are missing configurations or steps here.
$ adb shell am instrument -w -r -e debug false com.extension.runnercrashapp.test/android.support.test.runner.AndroidJUnitRunner
Client not ready yet..
Started running tests
Tests ran to completion.
Empty test suite.
Can you let us know whether we are missing configurations or steps here.
ma...@tomtom.com <ma...@tomtom.com> #5
No you don't miss anything, you were able to reproduce this bug. The expected behavior is that the test PASS. Mentioned crash is visible in logcat.
ar...@google.com <ar...@google.com> #6
We have passed this defect on to the engineering team and will update this issue with more information as it becomes available.
ar...@google.com <ar...@google.com>
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #8
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
nk...@google.com <nk...@google.com> #9
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
ma...@tomtom.com <ma...@tomtom.com> #10
Looks good, thanks
Description
E/TestExecutor: Fatal exception when running tests
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/app/DialogFragment;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1962)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.app.DialogFragment" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.extension.runnercrashapp.test-2/base.apk"],nativeLibraryDirectories=[/data/app/com.extension.runnercrashapp.test-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1962)
it happens only if module from gradle dependency is excluded, for example:
implementation ("com.google.android.gms:play-services-analytics:11.0.4") {
exclude group: 'com.android.support', module: 'support-v4'
}
Tested on devices with Android 5 and 7.
With version 0.5 of com.android.support.test:runner it wasn't happening.
To reproduce, run android tests from android studio or gradle connectedCheck
Small example project is available here: