RHQ & mockito
Stefan Negrea
snegrea at redhat.com
Fri Jan 27 21:23:37 UTC 2012
Hello Everybody,
I've done some recent research into mocking frameworks for use with RHQ tests. Out of all the frameworks I stumbled upon, mockito looked the best (http://code.google.com/p/mockito/).
Here are some features that set mockito apart:
- fluid interfaces
- concise api
- very good documentation (eg: http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html)
- vibrant & active community
- good maven integration, updates promptly published to maven repos
I know that jMock was used in some parts of RHQ however I find mockito superior especially around argument matchers, number of invocations, and call order. Please take a look at this blog post for a detailed comparison: http://www.zsoltfabok.com/blog/2010/08/jmock-versus-mockito/
I started this research in order to improve test coverage for the content system. My plan is to give mockito a try in that context and if successful apply it more broadly.
Any feedback or ideas are more than welcome.
Thank you,
Stefan Negrea
Software Engineer
More information about the rhq-devel
mailing list