RuntimeException:找不到测试类-Espresso Junit

时间:2018-10-25 13:49:53

标签: android code-coverage ui-automation android-espresso

我正在尝试借助工具测试生成代码覆盖率报告

我尝试了两种方法:

1)运行CreateDebugAndroidTestcoverageReport

以这种方式发出:

它生成了“ coverage.ec”,我将其重命名为“ coverage.exec”,并尝试在“显示覆盖率数据”中打开,但未显示任何内容。.那里的每一栏都是空白的。链接:-Jacoco converting coverage.ec to reports without coverage.em

2)我通过以下链接采用了另一种方法: http://blog.houzz.com/post/158160064293/android-code-coverage-with-jacoco ...但是它也可以工作 尝试执行以下命令时抛出错误:

adb shell am instrument -w -r -e coverage true  -e debug false -e class com.xxx.xxx.modules.testScenarios.PMGapTi
meError#PMTimeErrorMessage com.android.smoketest.tests/com.android.smoketest.SmokeTestRunner

错误:

WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
INSTRUMENTATION_RESULT: shortMsg=java.lang.RuntimeException
INSTRUMENTATION_RESULT: longMsg=java.lang.RuntimeException: Could not find test class. Class: com.xxx.xxx.modules.testScenarios
INSTRUMENTATION_CODE: 0

0 个答案:

没有答案