Search code examples
c#dllncover

finding the code coverage by refering Uni Test dll through Ncover code central


I am using ncover code central put on a server and collector on my desktop . now I m able to find the coverage of exe (my appliation) when manual tests or tests on gui by launching the application are executed but i want to profile the dll of my application not exe to find the code coverage using my reference unit Test dlls and posting the coverage on code central.

Please suggest how to do that


Solution

  • When covering unit tests, you need to profile the test runner process, not your application exe. If you are running NUnit, for example:

    • Create a new project on Code Central.
    • Go to the "Processes" tab and click "Edit Match Rules"
    • Add a match rule of Match type="Regex", Process matching="nunit-agent." NUnit ultimately triggers nunit-agent.exe to run the tests, so this is the process you want to cover.
    • Verify the new project is synced to Collector.
    • Run your unit tests.