I was looking a long time (5 days) for a way to get runtime code coverage for Android apps without writing a test case or Junit test. so I read the Android Application Testing Guide Ebook but dont found any answer. I found a solution in here!. I want to calculate the runtime coverage code (coverage.ec file). structure my project is: src>com.example>Instrumentation>EmmaInstrumentation src>com.example.calculator>Sources Java and gradle file doesn't add anyone. and give an error:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.example.calculator/com.example.instrumentation.EmmaInstrumentation}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: com.example.calculator/com.example.instrumentation.EmmaInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:951)
at com.android.commands.am.Am.onRun(Am.java:316)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:99)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
Aucun commentaire:
Enregistrer un commentaire