Android test project is crashing with error "Test run failed: Instrumentation run failed due to 'Process crashed.'"
For those migrating to or currently using Androidx
, this error results from using
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
instead of testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
.
Using the latter resolves the error completely.
Don't attach more than one robotium library. robotium-solo-1.6.0.jar should be removed. It's deprecated and you really shouldn't use it anymore.
Is your target application already installed? It should be installed, if you are going to run tests for it. You can not install it only if your test project has reference to target project.
If you have separate APKs for application and instrumentation you should change package in your manifest. You actually have "com.testcalculator" and target package is the same - they should be different. By the way I don't see sources of application in your project, so application part should be removed.
Your error doesn't say much, it's always good to post stacktrace from LogCat.
Read manuals before you start writing tests:
http://developer.android.com/tools/testing/testing_android.html https://code.google.com/p/robotium/w/list