aspose file tools*
The moose likes Testing and the fly likes Effective Unit Testing:Unit testing multi threading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Effective Unit Testing:Unit testing multi threading" Watch "Effective Unit Testing:Unit testing multi threading" New topic
Author

Effective Unit Testing:Unit testing multi threading

Zico Gupta
Greenhorn

Joined: Apr 27, 2011
Posts: 10
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
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Effective Unit Testing:Unit testing multi threading