• 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
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Effective Unit Testing:Unit testing multi threading

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Lasse,
I consider myself one of the lucky person having received one on one training from you in junit.

Coming to the new book, does it cover unit testing code which is written to run a multi threaded environment? Also please recommend some mocking tool.

Best Regards,
Zico
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Zico Gupta wrote:I consider myself one of the lucky person having received one on one training from you in junit.


That's nice to hear In case you're interested in TDD (or some of your colleagues are), I'm running a one-day workshop on TDD in Bangalore next week during the Agile India conference. I believe there's still seats available in that workshop.

Zico Gupta wrote:Coming to the new book, does it cover unit testing code which is written to run a multi threaded environment?


Not in very much detail. The most in depth coverage is in chapter 5, which describes a test smell called "sleeping snail" – a test that uses Thread.sleep(...) to wait that some thread has managed to complete its work before the test continues with assertions or further invocations.

In fact, Test Driven covers it in more detail than Effective Unit Testing – the whole chapter 7 is dedicated to dealing with threads.

Zico Gupta wrote:Also please recommend some mocking tool.


My personal favorite is Mockito. I'm sure some other libraries have some really advanced functionality that Mockito's missing but so far I haven't found a need for anything more capable. Actually, most of the time when I feel like I'm stretching Mockito to its limits, the real issue isn't Mockito but the design of the code I'm trying to mock.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic