dev2017. 4. 4. 16:46

http://cobertura.github.io/cobertura/


자바 기반의 프로젝트에 대해 무료로 사용할 수 있는 코드 커버리지 도구.


조대협님의 블로그에 정리된 내용을 보면 이해하는데 도움이 될 것 같다.

http://bcho.tistory.com/156


감사하게도 free 인데,

물론 그래서일까, 마지막 버전업이 2015/02/26... ㅠ


https://github.com/cobertura/cobertura

https://github.com/cobertura/cobertura/wiki


Ant, Command Line, Maven 각각을 이용해 실행 가능하다.

역시 자세한 설명도 사이트에.... -.-

Maven Usage


You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
  <!-- To use the report goals in your POM or parent POM -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>


Command Line Usage

https://github.com/cobertura/cobertura/wiki/Command-Line-Reference


cobertura-check.bat [--datafile file] [--branch 0..100] [--line 0..100] [--totalbranch 0..100] [--totalline 0..100] [--regex regex:branchrate:linerate]