IntegrationTest 与 cobertura 失败

问题描述

我想为我的项目生成覆盖率报告。为此,我发现我可以使用 cobertura [https://stackoverflow.com/questions/2006014/how-to-generate-cobertura-code-coverage-report-using-maven-from-hudson]。 我在 pom.xml 中为 java 11

添加了以下内容
         <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.5.2</version>
          <configuration>
            <classesDirectory>./test</classesDirectory>
            <formats>
              <format>xml</format>
            </formats>
          </configuration>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>cobertura</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

我想,当我运行 mvn cobertura:cobertura 时,我收到了未关闭java.lang.classFormatError: nest member class_info_index 35 has bad constant type in class file。当我运行 mvn clean package 时,文件会运行,但不会生成 .xml 文件。有什么方法可以实现覆盖率报告。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...