Greetings,
I have a large number of fitnesse tests for a project (1000+). Over time as features change, and shared fixtures come and go we have been left with unused orphaned code. But how to find it?
For those who don't know how fit works, you have a wiki page with a like like this:
| When a User Adds | 1 | and | 2 | He is returned | 3 |
Which is mapped at run time to a method like:
public bool WhenAUserAddsAndHeIsReturned(int first, int second, int expectedResult){
return ((first + second) == expectedResult)
}
finding all of these mappings by hand would be drudgery, writing a script to do it would be a long and difficult task. Im sure there must be a better solution.
Is there a utility out there that could monitor the fixture dll while the tests are running and then return a list of all classes and methods that were NOT run?
The key word you're looking for is coverage. Question #276829 covers some of the options for your C#/.NET platform.
Related to coverage are profiling tools. See this post for .Net recommendations. These tools tell you where your time is spent during execution, not necessarily when your code didn't go, but you can use them to find the dead code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With