MPDASHBOARD-9: Added links to reports for all aggregators.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@126217 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
7ca82f58b4
commit
2787017e7e
10 files changed
+331
-20
No files matched your search
@@ -49,47 +49,165 @@
|
||||
name="${maven.gen.docs}/dashboard-report.xml"/>
|
||||
<x:parse var="doc" xml="${dashboardAsFile}"/>
|
||||
|
||||
<!-- Verify number of rows -->
|
||||
<ant:echo>Check nb of rows in the report</ant:echo>
|
||||
<x:set var="count" select="count($doc//body/section/table/tr)"/>
|
||||
<assert:assertEquals expected="4" value="${count.intValue().toString()}"/>
|
||||
|
||||
<!-- Verify number of columns. One column for the project name and one for the 28
|
||||
aggregators -->
|
||||
<ant:echo>Check nb of columns in the report</ant:echo>
|
||||
<x:set var="countTitleColumn" select="count($doc//body/section/table/tr[1]/th)"/>
|
||||
<x:set var="countContentColumn" select="count($doc//body/section/table/tr[2]/td)"/>
|
||||
<!-- One column for the project name and one for the 23 aggregators -->
|
||||
<assert:assertEquals expected="29" value="${countTitleColumn.intValue().toString()}"/>
|
||||
<assert:assertEquals expected="29" value="${countContentColumn.intValue().toString()}"/>
|
||||
|
||||
<!-- TasklistClass aggregator test -->
|
||||
<ant:echo>Check tasklistclass aggregator</ant:echo>
|
||||
<x:set var="title" select="string($doc//body/section/table/tr[1]/th[20])"/>
|
||||
<assert:assertEquals expected="Classes Tasks" value="${title}"/>
|
||||
<x:set var="taskCount" select="string($doc//body/section/table/tr[2]/td[20])"/>
|
||||
<x:set var="taskCount" select="string($doc//body/section/table/tr[2]/td[20]/a)"/>
|
||||
<assert:assertEquals expected="1" value="${taskCount}"/>
|
||||
|
||||
<!-- TasklistMethod aggregator test -->
|
||||
<ant:echo>Check tasklistmethod aggregator</ant:echo>
|
||||
<x:set var="title" select="string($doc//body/section/table/tr[1]/th[21])"/>
|
||||
<assert:assertEquals expected="Methods Tasks" value="${title}"/>
|
||||
<x:set var="taskCount" select="string($doc//body/section/table/tr[2]/td[21])"/>
|
||||
<x:set var="taskCount" select="string($doc//body/section/table/tr[2]/td[21]/a)"/>
|
||||
<assert:assertEquals expected="2" value="${taskCount}"/>
|
||||
|
||||
<!-- Tasklist aggregator test -->
|
||||
<ant:echo>Check tasklist aggregator</ant:echo>
|
||||
<x:set var="title" select="string($doc//body/section/table/tr[1]/th[22])"/>
|
||||
<assert:assertEquals expected="All Tasks" value="${title}"/>
|
||||
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[22])"/>
|
||||
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[22]/a)"/>
|
||||
<assert:assertEquals expected="3" value="${taskCount}"/>
|
||||
|
||||
<!-- SCM Changed Files aggregator test -->
|
||||
<ant:echo>Check SCM changed file aggregator</ant:echo>
|
||||
<x:set var="title" select="string($doc/document/body/section/table/tr[1]/th[23])"/>
|
||||
<assert:assertEquals expected="SCM Changed Files" value="${title}"/>
|
||||
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[23])"/>
|
||||
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[23]/a)"/>
|
||||
<assert:assertEquals expected="8" value="${taskCount}"/>
|
||||
|
||||
<!-- SCM Changed Commit aggregator test -->
|
||||
<ant:echo>Check SCM commit aggregator</ant:echo>
|
||||
<x:set var="title" select="string($doc/document/body/section/table/tr[1]/th[24])"/>
|
||||
<assert:assertEquals expected="SCM commits" value="${title}"/>
|
||||
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[24])"/>
|
||||
<x:set var="taskCount" select="string($doc/document/body/section/table/tr[2]/td[24]/a)"/>
|
||||
<assert:assertEquals expected="4" value="${taskCount}"/>
|
||||
|
||||
|
||||
|
||||
<!-- Check generation of the URL on the index page of each project -->
|
||||
<ant:echo>Check that projects have a link to their index.html page</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[1]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/index.html" value="${URL}"/>
|
||||
<x:set var="URLText" select="string($doc/document/body/section/table/tr[2]/td[1]/a)"/>
|
||||
<assert:assertEquals expected="Maven Dashboard plugin test - Subproject1" value="${URLText}"/>
|
||||
|
||||
<!-- Check the link generation to the detail reports -->
|
||||
<!-- Subproject1 has report: we check that the link to the report exist -->
|
||||
<ant:echo>Check that subproject1 has a link to the checkstyle report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[2]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/checkstyle-report.html" value="${URL}"/>
|
||||
<!-- The subproject2 don't have any report we check that there isn't any link -->
|
||||
<ant:echo>Check that subproject2 has no link to detailed reports</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[3]/td[2]/a/@href)"/>
|
||||
<assert:assertEquals expected="" value="${URL}"/>
|
||||
|
||||
<!-- Now we check the link generation for all aggregators -->
|
||||
<ant:echo>Check the link to the detailed report for each aggregator</ant:echo>
|
||||
<!-- csall -->
|
||||
<ant:echo> Check csallreport</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[2]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/checkstyle-report.html" value="${URL}"/>
|
||||
<!-- cserrors -->
|
||||
<ant:echo> Check cserrors report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[3]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/checkstyle-report.html" value="${URL}"/>
|
||||
<!-- cswarnings -->
|
||||
<ant:echo> Check cswarnings report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[4]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/checkstyle-report.html" value="${URL}"/>
|
||||
<!-- csfiles -->
|
||||
<ant:echo> Check csfiles report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[5]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/checkstyle-report.html" value="${URL}"/>
|
||||
<!-- clovertpc -->
|
||||
<ant:echo> Check clovertpc report</ant:echo>
|
||||
<x:set var="URL" select="string($doc//document/body/section/table/tr[2]/td[6]/table/tr/td/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/clover/index.html" value="${URL}"/>
|
||||
<!-- cloverloc -->
|
||||
<ant:echo> Check cloverloc report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[7]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/clover/index.html" value="${URL}"/>
|
||||
<!-- cloverncloc -->
|
||||
<ant:echo> Check cloverncloc report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[8]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/clover/index.html" value="${URL}"/>
|
||||
<!-- junittests -->
|
||||
<ant:echo> Check junittests report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[9]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/junit-report.html" value="${URL}"/>
|
||||
<!-- junitpassrate -->
|
||||
<ant:echo> Check junitpassrate report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[10]/table/tr[1]/td[1]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/junit-report.html" value="${URL}"/>
|
||||
<!-- junitfailures -->
|
||||
<ant:echo> Check junitfailures report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[11]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/junit-report.html" value="${URL}"/>
|
||||
<!-- juniterrors -->
|
||||
<ant:echo> Check juniterrors report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[12]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/junit-report.html" value="${URL}"/>
|
||||
<!-- simiantdl -->
|
||||
<ant:echo> Check simiantdl report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[13]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/simian-report.html" value="${URL}"/>
|
||||
<!-- pmdfiles -->
|
||||
<ant:echo> Check pmdfiles report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[14]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/pmd-report.html" value="${URL}"/>
|
||||
<!-- pmdviolations 15 -->
|
||||
<ant:echo> Check pmdviolations report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[15]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/pmd-report.html" value="${URL}"/>
|
||||
<!-- fbfiles -->
|
||||
<ant:echo> Check fbfiles report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[16]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/findbugs-report.html" value="${URL}"/>
|
||||
<!-- fbviolations -->
|
||||
<ant:echo> Check fbviolations report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[17]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/findbugs-report.html" value="${URL}"/>
|
||||
<!-- jcoveragelipc -->
|
||||
<ant:echo> Check jcoveragelipc report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[18]/table/tr[1]/td[1]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/jcoverage/index.html" value="${URL}"/>
|
||||
<!-- jcoverageloc -->
|
||||
<ant:echo> Check jcoverageloc report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[19]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/jcoverage/index.html" value="${URL}"/>
|
||||
<!-- tasklistclass -->
|
||||
<ant:echo> Check tasklistclass report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[20]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/task-list.html" value="${URL}"/>
|
||||
<!-- tasklistmethod -->
|
||||
<ant:echo> Check tasklistmethod report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[21]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/task-list.html" value="${URL}"/>
|
||||
<!-- tasklist -->
|
||||
<ant:echo> Check tasklist report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[22]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/task-list.html" value="${URL}"/>
|
||||
<!-- scmchangedfiles -->
|
||||
<ant:echo> Check scmchangedfiles report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[23]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/file-activity-report.html" value="${URL}"/>
|
||||
<!-- scmchangedcommit -->
|
||||
<ant:echo> Check scmchangedcommit report</ant:echo>
|
||||
<x:set var="URL" select="string($doc/document/body/section/table/tr[2]/td[24]/a/@href)"/>
|
||||
<assert:assertEquals expected="multiproject/test-maven-dashboard-plugin-subproject1/changelog-report.html" value="${URL}"/>
|
||||
|
||||
</goal>
|
||||
</project>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<document>
|
||||
<properties>
|
||||
<title>Changelog Report</title>
|
||||
</properties>
|
||||
<body>
|
||||
<section name="Changelog Report">
|
||||
<p>Timeframe: 30 days, Total Commits: 0 Total Number of Files Changed: 0</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Author</th>
|
||||
<th>File/Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<document>
|
||||
<properties>
|
||||
<title>File Activity Analysis</title>
|
||||
</properties>
|
||||
<body>
|
||||
<section name="Activity by File">
|
||||
<p>Timeframe: 30 days, Total Commits: 0 Total Number of Files Changed: 0</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>File Name</th>
|
||||
<th>Number of times changed</th>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
@@ -17,8 +17,10 @@
|
||||
-->
|
||||
<project xmlns:j="jelly:core">
|
||||
|
||||
<preGoal name="dashboard:report-single">
|
||||
<preGoal name="site">
|
||||
<copy file="./conf/test/changelog.xml" todir="${maven.build.dir}"/>
|
||||
<copy file="./conf/test/changelog-report.xml" todir="${maven.gen.docs}"/>
|
||||
<copy file="./conf/test/file-activity-report.xml" todir="${maven.gen.docs}"/>
|
||||
</preGoal>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
<reports>
|
||||
<report>maven-checkstyle-plugin</report>
|
||||
<report>maven-clover-plugin</report>
|
||||
<report>maven-pmd-plugin</report>
|
||||
<report>maven-findbugs-plugin</report>
|
||||
<report>maven-junit-report-plugin</report>
|
||||
<report>maven-simian-plugin</report>
|
||||
<report>maven-jcoverage-plugin</report>
|
||||
|
||||
Reference in new issue
Block a user