有没有人真正设法让声纳跑步者与 Gallio 和 Ncover 合作?我已经尝试了书中的所有组合,并且在运行过程中它一直告诉我
“INFO spcgGallioSensor - Gallio 不会执行,因为没有测试项目。”
如果我单独运行所有内容(NCover,Gallio),它们会给出结果,而不是使用 Sonar-runner
请帮忙!!!
这就是我的配置看起来像 btw (sonar-project.properties 文件)
# Project identification
sonar.projectKey=DMG:PilotCompletePackageSolution
sonar.projectVersion=4.0.0
sonar.projectName=Pilot Filepointer
# Info required for Sonar
sources=.
sonar.language=cs
#Core C# Settings
sonar.dotnet.visualstudio.solution.file=FilePointer.sln
#Gendarme
sonar.gendarme.assemblies=\build\\DmgTech*.*
sonar.gendarme.mode=
# Gallio
sonar.gallio.mode=
sonar.gallio.reports.path=bin/
sonar.gallio.installDirectory=C:/program files (x86)/gallio
sonar.gallio.coverage.tool=NCover
sonar.donet.visualstudio.testProjectPattern=*test*
sonar.donet.visualstudio.testProjectPattern=*Test*
sonar.donet.visualstudio.testProjectPattern=*Tests
sonar.donet.visualstudio.testProjectPattern=*UnitTest*
sonar.NCover.installDirectory=c:/Program Files(x86)/NCover
# FXCop
sonar.fxcop.mode=
#StyleCop
sonar.stylecop.mode=
#NDeps
sonar.ndeps.mode=
更新
这是声纳创建的覆盖范围:
<?xml version="1.0" encoding="utf-8"?>
<!-- saved from NCover 3.0 Export url='http://www.ncover.com/' -->
<coverage profilerVersion="3.4.18.6937" driverVersion="3.4.18.6937" exportversion="3" viewdisplayname="" startTime="2012-05-11T08:07:34.8625409Z" measureTime="2012-05-11T08:07:40.7988805Z" projectName="New Project" buildid="734ad123-bd97-46c4-acfe-2ad0386b4d6a" coveragenodeid="0" failed="false" satisfactorybranchthreshold="95" satisfactorycoveragethreshold="95" satisfactorycyclomaticcomplexitythreshold="20" satisfactoryfunctionthreshold="80" satisfactoryunvisitedsequencepoints="10" uiviewtype="TreeView" viewguid="New Project" viewfilterstyle="None" viewreportstyle="SequencePointCoveragePercentage" viewsortstyle="Name">
<rebasedpaths />
<filters />
<documents>
<doc id="0" excluded="false" url="None" cs="" csa="00000000-0000-0000-0000-000000000000" om="0" nid="0" />
</documents>
</coverage>
这是手动覆盖:
<?xml version="1.0" encoding="utf-8"?>
<!-- saved from NCover 3.0 Export url='http://www.ncover.com/' -->
<coverage profilerVersion="3.4.18.6937" driverVersion="3.4.18.6937" exportversion="3" viewdisplayname="" startTime="2012-05-10T06:06:29.2440585Z" measureTime="2012-05-10T06:06:31.6464627Z" projectName="New Project" buildid="2c2073a0-18a6-4976-8858-c16755d1d1ff" coveragenodeid="0" failed="false" satisfactorybranchthreshold="95" satisfactorycoveragethreshold="95" satisfactorycyclomaticcomplexitythreshold="20" satisfactoryfunctionthreshold="80" satisfactoryunvisitedsequencepoints="10" uiviewtype="TreeView" viewguid="New Project" viewfilterstyle="None" viewreportstyle="SequencePointCoveragePercentage" viewsortstyle="Name">
<rebasedpaths />
<filters />
<documents>
<doc id="1" excluded="false" url="C:\tfsdata\FilePointer\UITest\UnitTest.cs" cs="81FA01B2B109478673AC792E586754E5" csa="406ea660-64cf-4c82-b6f0-42d48172a799" om="1" nid="0" />
<doc id="0" excluded="false" url="None" cs="" csa="00000000-0000-0000-0000-000000000000" om="0" nid="0" />
</documents>
<module moduleId="1" name="C:\tfsdata\FilePointer\bin\UITest.dll" assembly="UITest" assemblyIdentity="UITest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=x86" nid="0">
<class name="UITest.UnitTest" signature="UITest.UnitTest" excluded="false" nid="0">
<method name=".ctor" signature=".ctor() : void" excluded="false" instrumented="true" cc="1" vc="1" nid="0">
<seqpnt vc="1" o="0" l="16" el="16" c="9" ec="26" ex="false" fl="65536" doc="1" nid="0" />
<seqpnt vc="1" o="8" l="21" el="21" c="9" ec="10" ex="false" fl="65536" doc="1" nid="0" />
<seqpnt vc="1" o="9" l="0" el="0" c="0" ec="0" ex="false" fl="131072" doc="1" nid="0" />
</method>
<method name="get_TestContext" signature="get_TestContext() : Microsoft.VisualStudio.TestTools.UnitTesting.TestContext" excluded="false" instrumented="false" cc="1" vc="0" nid="0">
<seqpnt vc="0" o="1" l="33" el="33" c="17" ec="44" ex="false" fl="65536" doc="1" nid="0" />
<seqpnt vc="0" o="A" l="34" el="34" c="13" ec="14" ex="false" fl="65536" doc="1" nid="0" />
<seqpnt vc="0" o="B" l="0" el="0" c="0" ec="0" ex="false" fl="131072" doc="1" nid="0" />
</method>
<method name="set_TestContext" signature="set_TestContext(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext value) : void" excluded="false" instrumented="false" cc="1" vc="0" nid="0">
<seqpnt vc="0" o="1" l="37" el="37" c="17" ec="45" ex="false" fl="65536" doc="1" nid="0" />
<seqpnt vc="0" o="8" l="0" el="0" c="0" ec="0" ex="false" fl="131072" doc="1" nid="0" />
<seqpnt vc="0" o="8" l="38" el="38" c="13" ec="14" ex="false" fl="65536" doc="1" nid="0" />
</method>
<method name="TestMethod1" signature="TestMethod1() : void" excluded="false" instrumented="true" cc="1" vc="1" nid="0">
<seqpnt vc="1" o="1" l="0" el="0" c="0" ec="0" ex="false" fl="131072" doc="1" nid="0" />
<seqpnt vc="1" o="1" l="69" el="69" c="9" ec="10" ex="false" fl="65536" doc="1" nid="0" />
</method>
</class>
</module>
</coverage>