I am trying to use the HTML reports generated by my unit tests to show in the CruiseControl.NET dashboard, but I don't know where I'm scewing it up.
I have my report generated in the "CCNetWorkingDirectory". In my "CCNet.config" file I am using the File Merge Task to copy the report to my "CCNetArtifactDirectory". This is the step that does not work. I tried it in many different ways. I have:
<publishers>
<merge>
<files>
<file>
Index.html
</file>
<file action="Copy">
rep\Index.html
</file>
</files>
</merge>
<xmllogger/>
</publishers>
What should the paths in my configuration file be? My build breaks with the message:
"Failing Tasks : MergeFilesTask"
I really don't know what I am doing wrong.
I finally solved the problem.
In my ccnet.config file in the publishers node I have to copy the report.html like this:
<publishers>
<merge>
<files>
<file action="Copy">PathToWorkingDirectory\report.html</file>
</files>
</merge>
<xmllogger />
<artifactcleanup cleanUpMethod="KeepLastXBuilds"
cleanUpValue="50" />
</publishers>
The file will be copied to the artifact directory to a folder named like the Build Label. This has to be done due to security reasons:
HTML Source Location
This plug-in can display any file that is in the build folder under artifacts folder for the project. It cannot display files from any other location (for security reasons).
To display the HTML report you simply have to add this line to your dashboard.config:
<htmlReportPlugin description="HRMLReport" actionName="htmlreport" htmlFileName="report.html" />
This line has to be placed under the buildPlugins node.
<buildPlugins>
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
<buildLogBuildPlugin disableHighlightingWhenLogExceedsKB="50"/>
<htmlReportPlugin description="HRMLReport" actionName="htmlreport" htmlFileName="report.html" />
</buildPlugins>
After these steps your report should be displayed if you navigate in your dashboard to the build which generates the file. There should be a link called HTMLReport.