build.xml 파일 설정#

<target name="clover.with">
	<clover-clean />
	<delete dir=".clover" />
	<mkdir dir=".clover" />
	<clover-setup />
</target>

<target name="clover.compile" depends="build">
	<mkdir dir="${cloverreports}"/>
	<junit fork="yes" printsummary="true" showoutput="true">
		<classpath refid="classpath" />
		<formatter type="xml"/>
		<batchtest fork="yes" todir="${cloverreports}">
			<clover-optimized-testset fullrunevery="${clover.fullrunevery}" 
				enabled="${clover.optimize}" 
				minimize="${clover.minimize}" 
				ordering="${clover.ordering}">
				<fileset dir="${dir.test.java}" includes="**/*Test.java"/>
			</clover-optimized-testset>
		</batchtest>
	</junit>
</target>

<target name="clover.report" depends="clover.compile">
	<mkdir dir="${cloverreports}/clover_html" />
	<!--clover-html-report outdir="${cloverreports}/clover_html" title="HudsonSample" /-->
	<clover-pdf-report outfile="${cloverreports}/clover.pdf" />
	<clover-report>
		<current outfile="${cloverreports}/clover.xml" title="HudsonSample" 
			summary="true">
			<format type="xml" />
			<columns>
				<lineCount />
				<ncLineCount />
			</columns>
		</current>
	</clover-report>
</target>

<!-- 
특정 패키지내 클래들의 커버리지율을 정해서 기준값에 도달하지 못하면 에러를 뛰운다.
clover-check 의 target값을 패키지별 값보다 작게 선정하는게 정상이다. 
아래의 경우 전체적으로 60% 이상이어야 하고 
kr.or.openframework.hudson.common 패키지는 70% 이상이어야 한다는 뜻이다. 
 -->
<target name="clover.check.packages" depends="clover.report">
	<clover-check target="60%">
		<package name="kr.or.openframework.hudson.common" target="70%" />
	</clover-check>
</target>

<target name="clover.snapshot" depends="clover.report">
	<clover-snapshot file="${clover.snapshot.file}" span="3m" />
</target>

<target name="clover.record.point" depends="clover.snapshot">
	<mkdir dir="${clover.history}"/>
	<clover-historypoint historyDir="${clover.history}" overwrite="true" />
</target>

<target name="clover.hist.report" depends="clover.record.point">
	<clover-report>
		<historical outfile="${cloverreports}/historical.pdf" 
			historyDir="${clover.history}">
			<overview/>
			<coverage/>
			<chart/>
			<metrics/>
			<movers threshold="5%" range="20" interval="2w"/>
			<format type="pdf" />
		</historical>
		<historical outfile="${cloverreports}/clover_html/historical" title="${project.name}" 
			historyDir="${clover.history}">
			<overview/>
			<coverage/>
			<chart/>
			<metrics/>
			<format type="html" />
		</historical>
	</clover-report>
</target>

hudson 설정#

hudson 설정#

hudson 결과 리포트#

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jpg
clover.jpg 106.6 kB 1 05-Apr-2009 23:36 DongGukLee
jpg
clover1.jpg 15.2 kB 1 05-Apr-2009 23:35 DongGukLee
jpg
clover2.jpg 84.8 kB 1 05-Apr-2009 23:35 DongGukLee
« This page (revision-1) was last changed on 05-Apr-2009 23:35 by DongGukLee