Is it possible to simply compile an Emma instrumented APK using Android build.xml and not run any tests

前端 未结 2 1886
心在旅途
心在旅途 2021-01-18 10:02

I know of

ant coverage

However that does a few things, it compiles with emma instrumentation, installs, and runs the test apk. I don\'t wa

2条回答
  •  滥情空心
    2021-01-18 10:59

    // coverage.py

    development\testrunner\coverage.py

    def TestDeviceCoverageSupport(adb): """Check if device has support for generating code coverage metrics.

    This tries to dump emma help information on device, a response containing help information will indicate that emma is already on system class path.

    Returns: True if device can support code coverage. False otherwise. """ try: output = adb.SendShellCommand("exec app_process / emma -h")

    if output.find('emma usage:') == 0:
      return True
    

    except errors.AbortError: pass return False

    adb shell exec app_process / eamm -h

    build core images http://duykham.blogspot.com/2009/09/how-to-get-emma-code-coverage-of.html

提交回复
热议问题