为什么 jacoco:check 创建测试 class 时出错
Why does jacoco:check give an error when I create a test class
我正在使用 IntelliJ,当我 运行 我的项目时,它可以与 jacoco 和所有依赖项一起正常工作。
创建测试时class突然出现错误,我不明白为什么。
我得到的错误是这个。
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.5:check (jacoco-check) on project
statistik-jar: Coverage checks have not been met. See log for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :statistik-jar
当我有一个测试class时,它工作正常,但是当我再添加一个时它会出现这个错误。当我收到错误时,文件夹看起来像这样:
/Test
/test.class <-- working
/folder
/test2.class <-- gives a error
创建第二个时出现此错误class
因为 Jacoco 使用百分位数,如果您创建更多 类 并且没有相关测试,它将给出错误。
<value>COVEREDRATIO</value>
<minimum>0.xx</minimum>
检查这些数据。我会给你一些见解。
我正在使用 IntelliJ,当我 运行 我的项目时,它可以与 jacoco 和所有依赖项一起正常工作。
创建测试时class突然出现错误,我不明白为什么。
我得到的错误是这个。
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.5:check (jacoco-check) on project
statistik-jar: Coverage checks have not been met. See log for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :statistik-jar
当我有一个测试class时,它工作正常,但是当我再添加一个时它会出现这个错误。当我收到错误时,文件夹看起来像这样:
/Test
/test.class <-- working
/folder
/test2.class <-- gives a error
创建第二个时出现此错误class
因为 Jacoco 使用百分位数,如果您创建更多 类 并且没有相关测试,它将给出错误。
<value>COVEREDRATIO</value>
<minimum>0.xx</minimum>
检查这些数据。我会给你一些见解。