Can I Profile a given DLL using NCover?

Can I Profile a given DLL using NCover?

Hi

I have some DLLs(Class Libraries). So given a DLL, is it possible to find the coverage for these DLLs? If Yes How? I dont have any application(Exe) to profle.

Thanks in advance.

Pramod


RE: Can I Profile a given DLL using NCover?

How are you testing your dlls?

It is possible to use a program like NUnit to test a dll by having tests written in a dll.

We cover everything loaded into the application domain that you want profiled.

We give coverage on a program that is running.

What are your tests written in?

Joe


RE: Can I Profile a given DLL using NCover?

Thanks for the reply. These DLLs are independent of the applications. Right now I am nor sure in which application they are being used. They are not Nunit based test Dlls.

As I understand, NCover profiles only an application(exe - I dont see any other option) and all its dependent DLLs. correct me if I am wrong.

I just know the Dlls and want to profile that. is it possible to profile a dll?


RE: Can I Profile a given DLL using NCover?

You can set ncover up to run against multiple applications by using ncover against each of the programs.

We can't just exercise your code, that would not be code coverage. If you have a program that loads those dlls and executes code in them, we can tell you what code was covered by those items.

So with a program, yes we profile dll's.

Joe Feser


RE: Can I Profile a given DLL using NCover?

Just to clarify... it sounds to me like Pramod has a CLASS LIBRARY that he'd like to profile.

To do that, he'll need some tests already written.. probably in another class library.

And now he wants to use NCover to see how good his coverage is. The GUI is a little vague in this regard. it lists windows, console, iis, services as possible profiling targets, but not class libraries.

Hoping I'm right about all the above, I'd explain the "howto" in this way:

1) Pick "Windows or Console Application"

2) For "path to application to profile" select the path to your nunit-console.exe. this makes it look as if you're profing NUnit itself, but that isn't the case..

3) for "working folder" select the path to your actual class library that you'd like to test. path/bin/Debug or whatnot..

4) for "application arguments" select the path to the dll created by your test project. unitTestProject/bin/Debug or whatever..

done! Travis