Question

I'm trying to fix bugs in a very large C# code base that I'm not familiar with, so I often have trouble locating the piece of code that needs to be updated (there's no internal documentation and very few comments in the code)

I would love to have a general technique or procedure whereby I could:

  1. run the application
  2. use it in a specific way (ie. replicate a bug) & close it
  3. determine which methods and lines of code were executed
  4. remove all 'initialization' code that's common to all usage of the app

I've tried looking at code coverage results from dotCover, but it wasn't too helpful because a ton of code gets invoked at the beginning just to launch the app. It would be great if I could remove the 'common code' and only see coverage results past a certain point in execution.

Was it helpful?

Solution

I just remembered that dotCover lets you "re-start" profiling at an arbitrary point of execution. The solution I was looking for is given directly in their manual:

"click Drop Snapshot in the dotCover Controller dialog box to clear the coverage results, and then click Start profiling to restart the test session"

Recording Coverage of Manual Test Session

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top