Java Code Coverage Tool

from Tools 2010/07/12 11:13
코드를 개발하고 테스트를 하기 위해서 보통 xUnit 시리즈의 프레임웍을 많이 이용하고 있습니다..
추가로 테스트를 완료하고, 테스트한 범위가 개발한 코드의 몇 %를 했는지에 대한 척도도 매우 중요하겠지요.. 
Test Coverage 혹은 Code Coverage 라고 일컫는데요.. 
자바에서 Code를 테스트한 후에, 테스트한 범위(Coverage)에 대한 리포팅을 해주는 툴이 바로 Coverage Tool 인데요.. 
아래는 2개의 Coverage Tool에 대한 소개입니다. 

1. EclEmma(http://eclemma.org/)
EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License.

EclEmma는 eclipse에서 plug-in 해서 버튼 실행으로도 쉽게 사용할 수 있고, JaCoCo Library를 다운로드 받아서 Ant로 리포팅(http://www.eclemma.org/jacoco/trunk/doc/ant.html)을 받을 수 있네요.. 라이브러리 보다는 어플리케이션에서 쉽게 사용하고 바이너리를 내보낼때 좋을듯 하네요..

2. Cobertura(http://cobertura.sourceforge.net/)
Cobertura is a free Java tool that calculates the percentage of code accessed by tests. It can be used to identify which parts of your Java program are lacking test coverage. It is based on jcoverage.

Ant로 테스트를 해서 javadoc과 같은 report를 해주네요..
라이브러리는 Cobertura가 더 보기 좋게 리포팅을 하는 듯 합니다. 예제 : http://cobertura.sourceforge.net/sample/
저작자 표시

'Tools' 카테고리의 다른 글

rest framework 종류들..  (0) 2010/07/14
web framework 종류들..  (0) 2010/07/14
Java Code Coverage Tool  (0) 2010/07/12
repcached - add data replication feature to memcached 1.2.x  (0) 2010/07/06
CI(Continuous Integration) Feature Matrix  (0) 2010/07/05