5

I'm a complete build system newbie through and through. I've been playing with this for about two weeks on and off now and I just can't crack it, I think I've reached a point where I need a fresh pair of eyes. Ultimately I'm aiming for having a new NCover coverage report (the summary one at least) in my TeamCity build project.

I've tried all manner of things, some demo's I've found online, the Extras from the NCover guys and read so much I'm pretty confused! I have the following task in my MSBuild script:

<Target Name="TestCoverage">
    <Message Text="Test Assemblies @(TestAssemblies)" />
    <Gallio RunnerType="NCover" 
            IgnoreFailures="true"
            Files="@(TestAssemblies)"
            ReportDirectory="Reports"
            ReportTypes="xml"
            ReportNameFormat="gallio_cover"
            RunnerProperties="NCoverCoverageFile='$(MSBuildProjectDirectory)\Reports\codecoverage.xml'; 
                              NCoverArguments='//w %(TestAssemblies.RootDir)%(TestAssemblies.Directory) CoverageExcludeAttribute //ea //r:Local'" >
        <Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
    </Gallio>
</Target>

The error message I see in the gallio_cover.xml report that is produced is:

<logEntry severity="info" message="Connected&#xA;Profiled process terminated. Profiler connection not established." />
<logEntry severity="error" message="Host process exited with code: 1" />

I've snipped off a load of stuff from the last message.

I've seen so many different examples of how this 'should be done' that I can't seem to track down the problem with how I'm calling NCover via Gallio.

Any ideas or input would be really appreciated.

Thanks,

James.

IAdapter
  • 62,595
  • 73
  • 179
  • 242
Jammer
  • 9,969
  • 11
  • 68
  • 115
  • Why not run NCover as its own build task as in http://weblogs.asp.net/lkempe/archive/2008/03/30/integration-of-ncover-into-team-city-for-tech-head-brothers.aspx? What am I missing here? – Chris McCall Oct 07 '09 at 22:32
  • Hi Chris, My tests are written using xUnit at the moment and I was under the impression that NCover requires the NUnit console app. So I'm actually just trying this very thing using the xUnit console app, I've not seen anyone doing this so far. – Jammer Oct 07 '09 at 22:46

1 Answers1

2

NCover can execute any testing framework. We just need to know the application to call the parameters for that application.

Did you read this information on integrating NCover with TeamCity?

http://docs.ncover.com/how-to/continuous-integration/teamcity/

If you have any questions, feel free to contact support.

Thank you,

Joe Feser NCover

joe.feser
  • 439
  • 3
  • 10