Hi Ori,

In order for the CCNet dashboard to show the HTML version of the
NCover files, the whole coverage report folder will need to be copied
somewhere within the Artifacts directory of the project (you can't
just have them somewhere else on the file system). To do this you
would use the File Merge task:

http://confluence.public.thoughtworks.org/display/CCNET/File+Merge+Task

The File Merge task needs to go in the <publishers> block, not the
<tasks> block. You can use the Copy action along with the target
attribute to specify where you would like the files copied to. If the
target attribute is a relative path then it will be relative to the
Artifacts directory for that project.

I forget the exact syntax (tweak the examples below and see what works
for you), but to solve the problem you mentioned I would probably do
something like:

<merge>
  <files target="taxreports">
    <file action="Copy">ncover\taxreports\*.*</file>
  </files>
  <files target="taxreports\files">
    <file action="Copy">ncover\taxreports\files\*.*</file>
  </files>
  <files target="ssreports">
    <file action="Copy">ncover\ssreports\*.*</file>
  </files>
  <files target="ssreports\files">
    <file action="Copy">ncover\ssreports\files\*.*</file>
  </files>
</merge>

(note: the Copy needs to be capital C, not lower case c - and it
doesn't seem to work recursively when I tried, which is why I included
the second "\files\" entry for each report... NCover's HTML report
will want the contents of that "files" directory in the same relative
location if you want to drill down on individual class coverage, etc.)

You'll then also want to change the htmlFileName attributes in your
webdashboard.config to reflect the new (relative) paths of the
reports, probably like so:

<htmlReportPlugin description="SuperSpy Cover Report"
actionName="NCoverSSReport" htmlFileName="ssreports
\fullcoveragereport.html" />
<htmlReportPlugin description="TaxService Cover Report"
actionName="NCoverTaxReport" htmlFileName="taxreports
\fullcoveragereport.html" />

Hope that helps!

Cheers,

 - Sam.


On Jan 23, 2:46 pm, Ori <[email protected]> wrote:
> Hi,
> I am using NCover 3.4.14.6908 with CC.net 1.5.6804.1
> I use ncover to test my Fitnesse coverage.
> since i have one cc.net project, I am running ncover.console and
> reporting for each Fitnesse suite i have.(and i have a few).
> the problem is that I can't show all the fullcoveragereport.html in
> the dashboard  since I cant give a full path in the dashboard.config
> (of cc.net).
> how can I tell the dashboard to take the coverage.html from different
> places? (as i can create them in different folders in the
> <ncoverReport>)
>
> any help will be highly appreciated
>
> my cc.net config look like this:
> <tasks>
> <ncoverProfile>
>                         <executable>C:\Program 
> Files\NCover\NCover.Console.exe</executable>
>                         
> <coverageFile>C:\ApeDeskBuild\NCover\SuperSpy\SuperSpyCoverage.xml</
> coverageFile>
>                         <description>Ncover running Fitnesse 
> SuperSpy</description>
>
> <includedAssemblies>TritonAgentLib.dll;DeskStoreLib.dll;GateAgentLib.dll</
> includedAssemblies>
>                         
> <program>d:\wc\src\Fitnesse\TestLibs\SuperSpy\TestRunner.exe</
> program>
>                         <programParameters>-c 
> d:\wc\src\Fitnesse\TestLibs\superspy.config -
> results C:\ApeDeskBuild\results\fitnesseSuperSpy-results.xml -format
> xml localhost 8080 MiddleOfficeFrontPage.SuiteSuperSpy</
> programParameters>
>                         <workingDir>d:\wc\src\Fitnesse\Server</workingDir>
>                         <projectName>Fitnesse SuperSpy</projectName>
>                         <timeout>1000</timeout>
>                 </ncoverProfile>
>
>                 <ncoverReport>
>                         <executable>C:\Program 
> Files\NCover\NCover.Reporting.exe</
> executable>
>                         
> <!--<outputDir>C:\ApeDeskBuild\NCover\SuperSpy</outputDir>-->
>                         <outputDir>ncover\ssreports</outputDir>
>                         <reports>
>                                 <report>FullCoverageReport</report>
>                         </reports>
>                         <sortBy>CoveragePercentageAscending</sortBy>
>                         
> <coverageFile>C:\ApeDeskBuild\NCover\SuperSpy\SuperSpyCoverage.xml</
> coverageFile>
>                         <description>Ncover running Reporting 
> SuperSpy</description>
>                         <timeout>1000</timeout>
>                 </ncoverReport>
> <ncoverProfile>
>                         <executable>C:\Program 
> Files\NCover\NCover.Console.exe</executable>
>                         <coverageFile>C:\ApeDeskBuild\NCover\TaxService
> \TaxServiceCoverage.xml</coverageFile>
>                         <description>Ncover running Fitnesse 
> TaxService</description>
>
> <includedAssemblies>ServiceLib.dll;TaxExemptRules.dll;ServiceApi.dll</
> includedAssemblies>
>                         
> <program>d:\wc\src\Fitnesse\TestLibs\TaxService\TestRunner.exe</
> program>
>                         <programParameters>-c 
> d:\wc\src\Fitnesse\TestLibs\taxService.config
> -results C:\ApeDeskBuild\results\fitnesseTaxService-results.xml -
> format xml localhost 8080 MiddleOfficeFrontPage.SuiteTaxFeeService</
> programParameters>
>                         <workingDir>d:\wc\src\Fitnesse\Server</workingDir>
>                         <projectName>Fitnesse TaxService</projectName>
>                         <timeout>1000</timeout>
>                 </ncoverProfile>
>
>                 <ncoverReport>
>                         <executable>C:\Program 
> Files\NCover\NCover.Reporting.exe</
> executable>
>                         <outputDir>ncover\taxreports</outputDir>
>                         <reports>
>                                 <report>FullCoverageReport</report>
>                         </reports>
>                         <sortBy>CoveragePercentageAscending</sortBy>
>                         <coverageFile>C:\ApeDeskBuild\NCover\TaxService
> \TaxServiceCoverage.xml</coverageFile>
>                         <description>Ncover running Reporting 
> TaxService</description>
>                         <timeout>1000</timeout>
>                 </ncoverReport>
>
> and my dsahboard.config like this:
>  <buildPlugins>
>       <buildReportBuildPlugin>
>         <xslFileNames>
>           <xslFile>xsl\header.xsl</xslFile>
>           <xslFile>xsl\modifications.xsl</xslFile>
>           <xslFile>xsl\fitnesse.xsl</xslFile>
>           <xslFile>xsl\compile-msbuild.xsl</xslFile>
>           <xslFile>xsl\unittests.xsl</xslFile>
>           <xslFile>xsl\NCoverReporting30.xsl</xslFile>
>         </xslFileNames>
>       </buildReportBuildPlugin>
>       <buildLogBuildPlugin />
>           <htmlReportPlugin description="SuperSpy Cover Report"
> actionName="NCoverSSReport" htmlFileName="ncover
> \fullcoveragereport.html" />
>           <htmlReportPlugin description="TaxService Cover Report"
> actionName="NCoverTaxReport" htmlFileName="ncover
> \fullcoveragereport.html" />
>       <xslReportBuildPlugin description="Fitnesse Report"
> actionName="FitnesseBuildReport" xslFileName="xsl\fitnesse.xsl"></
> xslReportBuildPlugin>
>       <xslReportBuildPlugin description="MSBuild Report"
> actionName="MSBuildBuildReport" xslFileName="xsl\msbuild.xsl"></
> xslReportBuildPlugin>
>       <xslReportBuildPlugin description="NUnit Details"
> actionName="NUnitDetailsBuildReport" xslFileName="xsl\tests.xsl"></
> xslReportBuildPlugin>
>       <xslReportBuildPlugin description="NUnit Timings"
> actionName="NUnitTimingsBuildReport" xslFileName="xsl\timing.xsl"></
> xslReportBuildPlugin>
>      <!-- <xslReportBuildPlugin description="NCover Report"
> actionName="NCoverBuildReport" xslFileName="xsl
> \NCoverReporting30.xsl"></xslReportBuildPlugin>-->
>     </buildPlugins>

Reply via email to