Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Brain Dead Lock Testing

 
Steve Schooler
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Plan to be guided by this forum's lock postings, but it would be nice if there was "brain dead" lock testing (which excludes logic walk thru and conforming to standard pattern). Curious what testing others do. I only have access to two machines. Does this mean that I can only simulate two simultaneous clients?

Since don't yet know JUnit, prefer to avoid it for now, if feasible. Curious if JUnit big help in this specific situation. I've seen (and written) flawed locking code samples that didn't break on testing. This is apparent problem.

Wonder what industry standard testing strategy is (besides walk thru and checking for typical pattern of while loop[s] and synchronized methods/blocks)?
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My preferred form of testing is "coverage testing". This involves making tests that exercise every line of my code. Making the tests is half the problem, the other half is determining if the test actually does exercise all the code. For that purpose I use the Emma package when testing Java code.

I find the following test types to be useful:
- unit tests, proving that a small pieces of code do what they're required to do.
- regresion tests, proving that nothing has been broken by the recent changes.
- integration tests, proving that the pieces work together as a whole.
- coverage tests, proving that all code has been run.
- beta tests, actually giving the program to real users.


I'm sure there are more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic