I'm trying to get test coverage file from InstrumentationTestRunner but I have no idea how.
I tried:
adb shell am instrument -w tomzi.net.test/android.test.Instrument开发者_C百科ationTestRunner -e coverage true -e coverageFile /sdcard/myFile.ec
How can I access files from sdcard?
adb shell am instrument -w tomzi.net.test/android.test.InstrumentationTestRunner -e coverage true -e
Where can I find that file in that case? It says it should be in /data//coverage.ec but I can't find it.
Test runs well and last 47 seconds, so file should be written.
Thanks.
First you have to create sdcard otherwise it will not read or write,
1st create sd-card
create sd-card
2nd check like this your data
You need to create the SDCARD first otherwise you won't be able to read/write anything on it, please check this blog post:
http://www.androiddevelopment.org/2008/11/11/how-to-create-and-use-the-sd-card-with-the-android-emulator/
精彩评论