question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Test instrumentation process crashed. But there is no /files/ directory

See original GitHub issue

Hi all! I get this error Test instrumentation process crashed. Check my.long.package.activity#checkQuitDialog.txt for details But there is no /files folder in /data/data/androidx.test.orchestrator, only /cache and /cache_code. I run test on the Emulator

Prerequisites:

defaultConfig {
...
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        testInstrumentationRunnerArguments clearPackageData: 'true'
}
...
    testOptions {
        unitTests {
            includeAndroidResources = true
            returnDefaultValues = true
        }
        execution 'ANDROIDX_TEST_ORCHESTRATOR'
    }
...
dependencies {
    androidTestUtil 'androidx.test:orchestrator:1.1.1'
    androidTestImplementation('com.schibsted.spain:barista:2.7.1') {
        exclude group: 'com.android.support'
    }
    // Core library
    testImplementation 'androidx.test:core:1.1.0'
    androidTestImplementation 'androidx.test:core:1.1.0'

    // Assertions
    testImplementation 'androidx.test.ext:truth:1.1.0'
    androidTestImplementation 'androidx.test.ext:truth:1.1.0'

    // JUnit
    testImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'

    // JUnitRunner
    testImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test:runner:1.1.1'

    // Test helpers for LiveData
    testImplementation 'android.arch.core:core-testing:2.0.0'
    androidTestImplementation 'android.arch.core:core-testing:2.0.0'

    // UI /test
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1'
    implementation 'androidx.test.espresso:espresso-idling-resource:3.1.1'
    implementation 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'

    // Robolectric/Mockito
    testImplementation 'org.robolectric:robolectric:4.1'
    testImplementation 'org.mockito:mockito-core:2.23.4'
    androidTestImplementation("org.mockito:mockito-core:2.23.4")
    androidTestImplementation("org.mockito:mockito-android:2.23.4")

    // Rest mock
    testImplementation "com.squareup.retrofit2:retrofit-mock:$retrofitVersion"
    testImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
}

Thanks!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:22

github_iconTop GitHub Comments

12reactions
niall8zcommented, Apr 8, 2020

If anyone is still struggling with this, commenting out:

// execution 'ANDROIDX_TEST_ORCHESTRATOR'

In the testOptions of the project build.gradle enabled me to see more informative error messages from these tests.

3reactions
poorpeschinocommented, Nov 20, 2019

Emulator Android 4.4 works for me android44

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test instrumentation process crashed - where is the .txt file?
If you are working with an emulator, in A.S open Device File Explorer and go to: /data/user_de/0/android.support.test.orchestrator/files/, ...
Read more >
Instrumentation run failed due to 'Process crashed.
the procedure but when i run the app using junit test i am getting an error as Test run failed: Instrumentation run failed...
Read more >
Orchestrator crashes for TransactionTooLargeException ...
- I expect to see the test either passed or failed for an assertion failed in my code but I rather get the...
Read more >
Android test project is crashing with error “Test run failed
It is also possible that you have a JAR file located somewhere in your project folders (I had copied the Admob JAR file...
Read more >
5 Troubleshoot System Crashes
If the fatal error log indicates that the crash occurred in a compiler thread, then it is possible (but not always the case)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found