• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Brain Dead Lock Testing

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)?
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic