Integrating cobertura maven with Cruise control.

Integrating cobertura maven with Cruise control.
After integrating cobertura with maven.I started integrating it with cruise control for a reason that the user should be able to see the
cobertura report on a dashboard.

We need to tell the cruise control to locate the reports.

Step-1
Create a jsp file and name it as "cobertura-coverage.jsp"  in-cruisecontrol-bin-2.8.4\webapps\cruisecontrol

Step-2
Add the below content to ur "cobertura-coverage.jsp"

<%@ taglib uri="/WEB-INF/cruisecontrol-jsp11.tld" prefix="cruisecontrol"%>


<p>
<cruisecontrol:artifactsLink>
<iframe name="CoberturaFrame" id="cloverFrame" style="width:95%; height:700;"
marginheight="10" frameborder="0" marginwidth="10"
src="<%= artifacts_url %>/cobertura/index.html" width="600"></iframe>
</cruisecontrol:artifactsLink>


</p>


Step-3
open main.jsp file.It is present in cruisecontrol-bin-2.8.4\webapps\cruisecontrol
add the below tag
     <cruisecontrol:tab name="Cobertura" label="Cobertura" >
              <%@ include file="cobertura-coverage.jsp" %>
              </cruisecontrol:tab>


Step-4

Config file updation-config.xml

<cruisecontrol>
    <project name="mipdap_multiproject">
        <listeners>
            <currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
        </listeners>
        <bootstrappers>
       <!--     <antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" target="clean" />-->
        </bootstrappers>
        <modificationset quietperiod="30">
            <!-- touch any file in connectfour project to trigger a build -->
            <filesystem folder="projects/${project.name}"/>
        </modificationset>
        <schedule interval="100">
            <!--<ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml"/>-->
            <maven2 mvnhome="E://maven" pomfile="projects/${project.name}/pom.xml" goal="clean install"/>
        
        </schedule>
        <log>
            <merge dir="projects/${project.name}/target/test-results"/>
        </log>
        <publishers>
            <onsuccess>
                <artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/mipidap-web/target/mipidap-web-1.0.war"/>
<!-- for integrating Cobertura reports-->
                <artifactspublisher dest="artifacts/${project.name}"  subdirectory="cobertura" dir="projects/${project.name}/mipidap-src/target/site/cobertura"/>
            </onsuccess>
        </publishers>
    </project>
</cruisecontrol>


Step-5
See the integrated reports in -http://localhost:8081/cruisecontrol/buildresults/mipdap_multiproject

Comments

Popular posts from this blog

defining functions clojure

Integrating Struts2 with Spring Security using Custom Login Form