views:

63

answers:

2

I am setting up a fresh Continuous Integration environment for a .NET project. The basics are in place and I have also integrated the Visual Studio Code Analysis (FxCopCmd.exe) and Test Results (MSTest.exe).

How to do that?
a. Add an task for above mentioned tools, specify input dll and output xml/trx in the .build file of the project
b. Update ccnet.config, add blocks for those xml/trx files
c. Update dashboard.config, add block with fxcop-summary_1_36.xsl and MsTestSummary2008.xsl

Everything looks and works great. Now I also want to show Visual Studio 2008 Code Coverage and Code Metrics in CruiseControl.NET 1.5.7385.9 Build Report. Can somebody tell me how do I do that?

A: 

These links provides some clues:
- blogs.msdn.com/b/ms_joc/archive/2005/04/08/406608.aspx
- groups.google.com.ag/group/ccnet-user/browse_thread/thread/63c5b36a24f4366a

Salil
A: 

You can also use the tool NDepend integrated inside your continuous integration process to:

  • gather code coverage metric values produced by Showing Visual Studio 2008 Code Coverage
  • use the code coverage metric values to show them in report by writing CQL rules like

    WARN IF Count > 0 IN SELECT METHODS FROM NAMESPACES "MyFullCoveredNamespace1","MyFullCoveredNamespace2" WHERE PercentageCoverage < 100

  • use some of the 82 NDepend code metrics to write CQL rules like

    WARN IF Count > 0 IN SELECT METHODS
    WHERE NbLinesOfCode > 30 OR CyclomaticComplexity > 10

Patrick Smacchia - NDepend dev