tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: New joiner's question - mocking for unit tests
Date Fri, 23 Jul 2010 08:53:12 GMT
On 23/07/2010 03:51, Alexander Shirkov wrote:
> Hello all
> 
> I have quick question: Is there mocking framework in project?
No.

> Writing dummies for unit tests is quite useless and boring thing. Plus it¹s
> filling codebase with ³noise².
With the tests we have written so far, there hasn't been that much
noise. I quite like that most of the tests Tomcat does have take the
form of Servlets, JSPs or similar. As well as testing the specific bug
or feature, I like the assurance it gives that things are working
end-to-end.

> I have some experience with:
>  
> JMock - http://www.jmock.org/
> EasyMock - http://easymock.org/
> Mockito (my favourite) - http://mockito.org/
> 
> First one hasn¹t updated since Feb 2009, so I think it¹s  not a good idea to
> look there. Two others are great: both have dynamic proxying for interfaces
> and classes.

As I recall, someone did submit a unit test for a Tomcat bug some time
(years) ago that used a mocking framework. That is about the only
instance I can recall.

I guess I am neutral on the idea overall. I'm not against it if there is
sufficient need, but so far I haven't found a need for it. Maybe there
is a need and I just can't see it. Shrug.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message