On 07/02/02 Nick Drochak wrote:
> | 3) Does there exist any documentation on "how to ensure a class has test
> | coverage"?  By this I mean a checklist or similar document that takes an
> | example class and breaks out all the test cases that should be
> 
> No, there isn't such a system right now.  I'd love a template builder for a
> class that would use Reflection (I suppose) to build a unit test template
> that has TestXXX() for all public members of said class. You would probably
> want to do one or two unit tests by hand first to see what you are getting
> into, and so you can fully appreciate how much the tool helps :)

Actually, it is quite easy to get a coverage report using the profiling
API: you just record all the methods that have been executed and compare
the list with all the methods exported/implemented by an assembly.
It's, like, 50 lines of code. I'll do it once I separate the profile
code in a loadable module. Then, you'll invoke it with something like:

        mono --profile=coverage,corlib corlibtestes.exe ...

You can do it already with simply mono --profile, if you don't mind
doing a bit of munging on the output yourself. A separate coverage
module can create nicer output, though.

lupus

-- 
-----------------------------------------------------------------
[EMAIL PROTECTED]                                     debian/rules
[EMAIL PROTECTED]                             Monkeys do it better

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to