【问题标题】:Sonar is running Gallio with OpenCover but Sonar is still reporting code coverage: 0%Sonar 正在使用 OpenCover 运行 Gallio,但 Sonar 仍在报告代码覆盖率:0%
【发布时间】:2013-03-28 10:50:54
【问题描述】:

我正在尝试通过声纳以开放式覆盖运行代码覆盖。我正在使用以下内容:

声纳 3.5
C# 插件生态系统 2.0
OpenCover 4.5.1313
加里奥 v3.4.14.0
声纳运行器 2.1

当我运行 sonar-runner 测试运行和 OpenCover 运行时,报告位于 .sonar 文件夹中,但声纳网站从未更新,我的覆盖率保持在 0%。

问题似乎类似于this

这是我的声纳项目属性

# Project identification
sonar.projectKey=Simple.Project
sonar.projectVersion=1
sonar.projectName=Simple
# Info required for Sonar 
sonar.sources=.
sonar.language=cs
#Core C# Settings 
#sonar.dotnet.visualstudio.solution.file=Source/TAMPWebsite/TAMPWebsite.sln
sonar.silverlight.4.mscorlib.location=C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v4.0
sonar.dotnet.excludeGeneratedCode=true
sonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319
sonar.dotnet.version=4.0

#Gendarme
sonar.gendarme.mode= 

sonar.sourceEncoding=UTF-8

# Gallio / Unit Tests
sonar.gallio.mode=
sonar.gallio.coverage.tool=OpenCover
sonar.gallio.runner=IsolatedProcess
sonar.gallio.installDirectory=C:/Program Files (x86)/Gallio
sonar.dotnet.visualstudio.testProjectPattern=*Test*
sonar.opencover.installDirectory=C:/Program Files (x86)/OpenCover/

# FXCop 
sonar.fxcop.mode=skip  
#StyleCop 
sonar.stylecop.mode=skip
#NDeps
sonar.ndeps.mode=skip
#sonar.switchoffviolations.allfile=DatabaseMigrations
#exclusions
#sonar.exclusions=**generated*,**T4MVC**,**/DatabaseMigrations/**

【问题讨论】:

标签: .net code-coverage sonarqube gallio opencover


【解决方案1】:

你正面临这个错误:http://jira.codehaus.org/browse/SONARDOTNT-301

它已修复,将在几天后发布的 2.1 版本中提供。

【讨论】:

  • 感谢您的回复。插件发布后我会更新。
猜你喜欢
  • 1970-01-01
  • 2016-05-28
  • 2012-12-22
  • 2017-03-17
  • 1970-01-01
  • 2012-09-30
  • 2016-03-06
  • 2013-12-03
  • 2012-05-17
相关资源
最近更新 更多