How to run findbug on the test code

喜欢而已 提交于 2020-01-14 02:33:47

问题


I have a test only maven project. The folder structure is as follows

project-root
|_ src
|  |_ main
|  |  |_ java
|  |  |_ resources
|  |_ test
|     |_ java
|     |_ resources
|_ .classpath
|_ .project

When I run the findbug plugin It do not pick the classes under test.

Is there a way we can instrument the test code which is under test, to find bug?

My maven pon has the below plugin under the reporting section

<reporting>
 <plugins>
  <plugin>
   <groupId>org.codehaus.mojo</groupId>
    <artifactId>findbugs-maven-plugin</artifactId>
   <version>3.0.1</version>
   <configuration>
    <threshold>low</threshold>
    <xmlOutput>true</xmlOutput>
   </configuration>
  </plugin>
 </plugins>
</reporting>

when I do mvn clean compile site it will generate a report containing only classes in main module.

Need help .....

来源:https://stackoverflow.com/questions/31015058/how-to-run-findbug-on-the-test-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!