========================================================
get emma coverage steps:
========================================================
1. build target app and test app:
semc-build debug-test-instr -Demma-coverage-on=true -Drun-emma=true
解决自动重启并且清除data:semc-build ci-onrunning-instr -Demma-coverage-on=true -Drun-emma=true
2. adb push target app into phone
adb push SomcChameleonWorkflow /system/priv-app/
adb push bin/SomcChameleonWorkflow.apk /system/priv-app/SomcChameleonWorkflow/
adb push semc-build-output/SomcChameleonWorkflow/bin/SomcChameleonWorkflow.apk /system/priv-app/SomcChameleonWorkflow/
3. install test app into phone
adb install -r semc-build-output/test-SomcChameleonWorkflow/bin/test-SomcChameleonWorkflow.apk
4. run auto test(-r -e coverage true -e 生成coverage.ec文件)
adb shell am instrument -r -e coverage true -e class com.sonymobile.chameleon.workflow.FBasicSetupActivity -w com.sonymobile.chameleon.workflow.tests/android.test.InstrumentationTestRunner
adb shell am instrument -r -e coverage true -e class com.sonymobile.chameleon.workflow.FBasicSetupActivity -w com.sonymobile.chameleon.workflow.tests/com.sonymobile.chameleon.workflow.runners.FunctionalTestRunner
adb shell am instrument -r -e coverage true -e class com.sonymobile.chameleon.workflow.FBasicSetupActivity -w com.sonymobile.chameleon.workflow.tests/com.sonymobile.chameleon.workflow.runners.UnitTestRunner
5. pull out the .ec file from the phone
adb pull /data/data/com.sonymobile.chameleon.workflow/files/coverage.ec reports/coverage/
6. generate emma coverage report:
java -Xmx128m -cp ~/.semctools/emma/emma.jar emma report -r html -sp ./src -in reports/coverage/coverage.ec,reports/coverage/coverage.em
Notes:
1. 以上每一步都是在workflow的代码根目录:vendor/semc/packages/apps/chameleon/workflow$
get emma coverage steps:
========================================================
1. build target app and test app:
semc-build debug-test-instr -Demma-coverage-on=true -Drun-emma=true
解决自动重启并且清除data:semc-build ci-onrunning-instr -Demma-coverage-on=true -Drun-emma=true
2. adb push target app into phone
adb push SomcChameleonWorkflow /system/priv-app/
adb push bin/SomcChameleonWorkflow.apk /system/priv-app/SomcChameleonWorkflow/
adb push semc-build-output/SomcChameleonWorkflow/bin/SomcChameleonWorkflow.apk /system/priv-app/SomcChameleonWorkflow/
3. install test app into phone
adb install -r semc-build-output/test-SomcChameleonWorkflow/bin/test-SomcChameleonWorkflow.apk
4. run auto test(-r -e coverage true -e 生成coverage.ec文件)
adb shell am instrument -r -e coverage true -e class com.sonymobile.chameleon.workflow.FBasicSetupActivity -w com.sonymobile.chameleon.workflow.tests/android.test.InstrumentationTestRunner
adb shell am instrument -r -e coverage true -e class com.sonymobile.chameleon.workflow.FBasicSetupActivity -w com.sonymobile.chameleon.workflow.tests/com.sonymobile.chameleon.workflow.runners.FunctionalTestRunner
adb shell am instrument -r -e coverage true -e class com.sonymobile.chameleon.workflow.FBasicSetupActivity -w com.sonymobile.chameleon.workflow.tests/com.sonymobile.chameleon.workflow.runners.UnitTestRunner
5. pull out the .ec file from the phone
adb pull /data/data/com.sonymobile.chameleon.workflow/files/coverage.ec reports/coverage/
6. generate emma coverage report:
java -Xmx128m -cp ~/.semctools/emma/emma.jar emma report -r html -sp ./src -in reports/coverage/coverage.ec,reports/coverage/coverage.em
Notes:
1. 以上每一步都是在workflow的代码根目录:vendor/semc/packages/apps/chameleon/workflow$