views:

641

answers:

2

Hi All,

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.

+2  A: 

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
A: 

James,

Did you managed to resolve this? I am getting the same issue and I would prefer not to split the processes. If I run the build script outside of Team City (on the build server) it runs as expected. It only seems to be an issue when running under Team City.

Any thoughts would be appreciated.

Blue Horizons
Update - The solution is to make sure that the build agent service account is running under an admin account and not the local service account.
Blue Horizons