android / android/testing-samples
Error: Test instrumentation process crashed. But there is no /files/ directory
- Dominant language
- Java
- Stars
- 9.3k
- Forks
- 3.6k
- PR merge metrics
- No merged PRs in 30d
Description
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!
Contributor guide
Research direction
Reproduce the emulator test with the listed AndroidX Test Orchestrator 1.1.1 configuration and inspect the reported checkQuitDialog.txt error. Compare the expected /data/data/androidx.test.orchestrator/files/ path with the available /cache and /cache_code directories; done means identifying the cause of the crash or documenting the missing diagnostic needed to do so.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100