NCover on web services in ASP.Net

NCover on web services in ASP.Net

I noticed that whenever we ran a few tests on asp.net web services, the aspnet worker process connected to ncover.console, but ncover never got any "stop" message to create its xml report.
Then after a period (afterwards I discovered this was a timeout of two minutes) the ncover process threw an exception.

I compiled things and changed something:

  • In Driver.cs
    • WaitForExit:
      • call to MessageCenter.WaitForShutdownEvent(proc) : proc is not instantiated when ncovering asp.net.  So I added a little code to get to aspnet_wp.
      if (Settings.ProfileIIS)

                  {

                      Process[] found = Process.GetProcessesByName("aspnet_wp");

                      _proc = found[0];

                  }

    • I changed the timeout period to 1s.  This has the advantage ncover reacts immediately.
This got me further, but has another drawback: when trying to call GetCoverageData, ncover doesn't get at the pipe data any more.  I am stuck.

Maybe the worker process is not what I should have referenced ?


Re: Exclusion of properties

TD.Net is using an early alpha of the 1.5.7 release - it has a number of issues still though and will be superceded by the "proper" 1.5.7 release.

As far as exclusion of properties is concerned, it is no different to trying to apply the [DebuggerStepThrough] attribute - you have to apply it to the individual get/set as it won't work at the outer level.

If you want to exclude an assembly from coverage, thats when you make use of the //a argument to say exactly which assemblies you do want to have profiled.


Re: No data in Coverage.XML

James,

Remove the ".dll" from your assemblies node - i.e. MyCompany.Common.Utilities


Re: No data in Coverage.XML

Thanks a lot that works