Forum Discussion

srmahale's avatar
14 years ago

Finding the Code Coverage by Unit Test cases with the help of AQTime

Hi,

I have written NUnit Unit Test cases for business logic (dll) and wanted to find the code covered by these test cases. For this I am using AQTime's Code Coverage Profiler. It always shows 0% code covered. However, if I used another WinForm application as a client of business logic and perform the code coverage then its shows correct code coverage.

Please guide me whether I am missing any perticualar settings while using NUnit as client.



Environment is as:

Business Logic dll - C# .NET 4.0

NUnit - 2.5.5

AQtime - V6.5



Thanks,

Sandeep

2 Replies


  • Hi Sandeep,





    Can you reproduce this behavior on a sample application tested by NUnit? If you can, please send us this application along with your AQtime project directly via the Contact Support form.





    If you cannot reproduce the problem with a sample application, please send us just your AQtime project.
  • rarevans's avatar
    rarevans
    New Contributor
    Hi Sandeep,

    Something I encounter with profiling unit tests in nunit is the shadow copy that it uses.

    If you are aware of this already, sorry about repeating stuff you may know.



    Nunit copies unit test dlls to temporary directory to run them. So what you see test results for is actually a separate dll.

    You can disable this with a command line parameter to the nunit-console execution.



    Hope that helps.

    Richard