기본설정#

  1. 라이센스 파일을 다운로드 해서 clover.jar 파일이 존재하는 디렉터리에 복사해넣는다.
  2. 라이센스 설정법 : http://confluence.atlassian.com/display/CLOVER/How+to+configure+your+clover.license

build.xml 파일설정#

task 정의 가져오기#

<property name="clover.jar" location="${clover.home}/lib/clover.jar"/>
<taskdef resource="cloverlib.xml" classpath="${clover.jar}" />
<taskdef resource="cloverjunitlib.xml" classpath="${clover.jar}"/>

기본적인 설정#

<target name="clover.with">
	<clover-setup />
</target>

<target name="clover.compile" depends="clover.with, 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">
	<clover-html-report outdir="${cloverreports}/clover_html" 
		title="HudsonSample"/>
</target>

이력정보 생성및 리포팅#

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

<target name="clover.hist.report" depends="clover.record.point, clover.with">
	<clover-report>
		<historical outfile="${cloverreports}/historical.pdf" historyDir="${clover.history}">
			<format type="pdf" />
		</historical>
		<historical outfile="${cloverreports}/clover_html/historical" title="${project.name}" historyDir="${clover.history}">
			<format type="html" />
		</historical>
	</clover-report>
</target>

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-7) was last changed on 04-Apr-2009 18:40 by DongGukLee  
G’day (anonymous guest) My Prefs

Referenced by
Theory

JSPWiki v2.8.4