• 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

Concurrency Testing

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the best way to do concurrency testing? We have testers do some load testing as part of acceptance testing. We also use JUnitPerf in a limited capacity as part of our regular build.

How do you determine what parts of the app need concurrency testing? I'm guessing it would be best to do some sort of concurrency testing at the functional level based on use-cases / user stories.
 
author
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

Originally posted by Paul Croarkin:
What is the best way to do concurrency testing? We have testers do some load testing as part of acceptance testing. We also use JUnitPerf in a limited capacity as part of our regular build.

How do you determine what parts of the app need concurrency testing? I'm guessing it would be best to do some sort of concurrency testing at the functional level based on use-cases / user stories.


TestNG has several features that can help with that.

For example:

@Test(invocationCount = 1000, threadPoolSize = 10, timeOut = 5000)
public void invokeServlet() {
// ...
}

This will tell TestNG to invoke this method 1000 times from 10 different threads. If any of these threads fail to return without 5 seconds, TestNG will mark that invocation as a failure.

Once this is done, you can have another test method that depends on this one that will check that, for example, the database is in a healthy state, thereby showing that the code under test is most likely multithread safe.

TestNG also lets you run your tests in parallel in all sorts of ways, please take a look at the Web site (http://testng.org) for more details, or ask here.

--
Cedric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic