• Post Reply Bookmark Topic Watch Topic
  • New Topic

Coverage Testing  RSS feed

peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm posting this as a reminder of the benefits of coverage testing.

I've spent a lot of time on my LockManager class, tested it with 10 times as many threads as records and a 100 step manual test plan. It worked flawlessly, but I noticed while looking at the coverage stats that a 2 line piece of code was not being executed. I set up a test to ensure that code got run and found a subtle but deadly bug relating to a client crashing while it was waiting to aquire a lock. The fix involved moving one line of code in another method 3 lines lower.

I use the program Emma for coverage testing, its free, works well and is easy to use, it has a few bugs related to the use of System.exit, and I can't figure how to use the -D option to set headless mode, but otherwise seems quite solid.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!