Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test instrumentation process crashed - where is the .txt file?

Sometimes, while Espresso testing, I see the following exception.

Test instrumentation process crashed.  Check package_name.TestName#methodName.txt for details

Where is this .txt file stored? I can't seem to find it anywhere.

Use Case

In Jenkins (CI), I want the logs to see exactly what stacktrace caused the crash.

like image 516
ZakTaccardi Avatar asked Apr 23 '18 16:04

ZakTaccardi


4 Answers

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/, then you can look for a particular file there

EDIT: June 25 - 2019 >> If you have updated to AndroidX dependencies, then the .txt file is located in /data/user_de/0/androidx.test.orchestrator/files/

like image 58
Carlos Daniel Avatar answered Oct 21 '22 11:10

Carlos Daniel


In my case, it was simpler to just check Logcat, rather than listen to that recommendation

like image 30
Shalbert Avatar answered Oct 21 '22 11:10

Shalbert


For others encountering this issue, as @antek pointed out the files might not be accessible on a non-rooted device. You might try using an emulator running a non-Google Play API where you can obtain a root shell.

adb root
adb shell
ls /data/data/androidx.test.orchestrator/files

Alternatively, you could try running the tests using the debugger.

like image 27
user650881 Avatar answered Oct 21 '22 11:10

user650881


I could not find the text file, but I was able to get logcat and view the fatal that caused the orchestrator to crash

first I clear the logcat

adb logcat -c

then I run the test, then I grab the logcat

adb logcat > ~/Desktop/logcat

then I open logcat file and search for string FATAL

like image 30
the_prole Avatar answered Oct 21 '22 13:10

the_prole