Help needed configuring CruiseControl.NET statistics merge

孤街醉人 提交于 2019-12-08 04:48:21

问题


I am looking for a pointer as to how to get statistics out of a merge xml file. The file structure looks like this ..

<CyclometricComplexity>
  <module name="Srvr" type="unit" total="14" low="14" medium="0" high="0" ultra="0"/>
</CyclometricComplexity>

I have created a merge publisher to pick up this file, but cannot configure the statistics publisher to pick up values for total, low, medium, high and ultra.

Does anyone have an example they can point me at to help me out?

Thanks


回答1:


I think I found how to do this. First I needed to understand how XPath works! Then I changed my output tool to create a summary of the entire project, rather than trying to get CCNET to aggregate them together, so the out put now has total, low, medium, etc. for the entire project. Then I changed my statistics section to be as follows ...

  <firstMatch name='Total Methods' generateGraph='true' xpath='//CyclometricComplexity/@total'/>
  <firstMatch name='Low Complexity' generateGraph='true' xpath='//CyclometricComplexity/@low'/>
  <firstMatch name='Medium Complexity' generateGraph='true' xpath='//CyclometricComplexity/@medium'/>
  <firstMatch name='High Complexity' generateGraph='true' xpath='//CyclometricComplexity/@high'/>
  <firstMatch name='Ultra Complexity' generateGraph='true' xpath='//CyclometricComplexity/@ultra'/>

The stats are now showing in the detailed statistics, and I need to now start asking questions about how to do bespoke graphs!



来源:https://stackoverflow.com/questions/839306/help-needed-configuring-cruisecontrol-net-statistics-merge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!