Jmockit代码覆盖gradle

时间:2016-07-08 11:22:44

标签: gradle jmockit

我正在尝试从gradle脚本执行jmockit代码覆盖工具,如下所示:
task jmockit(type: JavaExec) { main = "mockit.coverage.CodeCoverage" classpath configurations.jmockit args("-Djmockit-coverage-output=html," + "-Djmockit-coverage-outputDir=${project.projectDir}/coverage-report," + "-Djmockit-coverage-srcDirs=${project.projectDir}/src," + "-Djmockit-coverage-classes=com.example.*," + "coverage-metrics=all") }

但我有这个例外:

Exception in thread "main" java.lang.IllegalArgumentException: No input "coverage.ser" files found
    at mockit.coverage.DataFileMerging.merge(DataFileMerging.java:57)
    at mockit.coverage.OutputFileGenerator.generateAggregateReportFromInputFiles(OutputFileGenerator.java:122)
    at mockit.coverage.CodeCoverage.main(CodeCoverage.java:39)

也许我做错了什么?

0 个答案:

没有答案