Make OpenCover Reports Available in CruiseControl.NET

I am trying to integrate OpenCover with CruiseControl.NET . At this point, I modified the build system, so it runs my nunit tests in OpenCover. Then I create the Xml and Html reports using ReportGenerator .

Assuming you can integrate the reports generated by ReportGenerator into the CruiseControl.NET webapp, how do I integrate the two?

NCover has its own NCoverReporting task , which can be used, but since I do not run NCover, I cannot compare its output with the XML reports created by OpenCover.

Related thoughts / questions:

  • OpenCover generates an XML file by default, but is this XML file available for cc.net?
  • ReportGenerator also generates XML, are they for something like cc.net?
  • cc.net has a File-Merge publisher that combines logs, but I have not yet found documentation indicating which file formats are useful / used by cc.net.
+6
source share
2 answers

I had this problem and solved it using these steps, consider that I am using msbuild, so this will only work if you use msbuild:

  • Add target to cover
  • Add task to build.proj to create OpenCoverage output (OpenCoverReport.xml)
  • Immediately after that, add a task to create a summary report using ReportGenerator (report types: XML). For example: MSBuild shell example
  • Create XSL Transforms to generate HTML output using Summary.xml, don’t worry, I wrote it already: to parse the assembly level at the assembly level (in the output of the assembly log) use the following: XSLT to report assembly level coverage and to parse class level coverage (verbose report) use the following: XSLT for class level coverage report
  • Add buildReportBuildPlugin and xslReportBuildPlugin to create both reports using previous XSLT files in the dashboard.config file: Add this to the configuration
  • Combine the resulting XML coverage report file with the assembly output in the ccnet.config file: add this to your configuration
+8
source

You can use External Links in your ccnet.config after publishing your report through IIS

<externalLinks> <externalLink name="Code Coverage" url="http://cc.net/coverage" /> </externalLinks> 
+2
source

Source: https://habr.com/ru/post/901146/


All Articles