Search code examples
vb.netcode-coverage

Does it exist any simple code coverage tools?


Are there any free or cheap Code coverage tools I can use "ad hook" just to run my program and see wich methods that is not runned in the project for that session? Im not interrested in tools that has to use unit-tests or a lots of advanced functions. If possible just "hit'n run".

Its for a "fun" event in a "programmer pentathlon". I'll get 10 programmers run a program and the person that cover most code when running it will win.


Solution

  • OpenCover and PartCover are two opensource tools that should suffice. PartCover is more well known but is 32 bit and only does line coverage. OpenCover came along a bit later and handles 32 and 64 bit and also does branch coverage. Both handle .NET2 and .NET 4 framework based languages (i.e. C#, VB.NET, etc etc) as long as they produce PDB files (which they both use for instrumentation).

    NCover do a trial version which may be okay for your short term needs and they also do a free version but I think that is .NET 2.0 only.

    This stackoverflow question What can I use for good quality Code Coverage for C#/.NET? is also useful for other tools - take your pick