jakarta-cactus-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Unit tests for server side code?
Date Sun, 06 Jul 2003 16:26:32 GMT


> -----Original Message-----
> From: Nicholas Lesiecki [mailto:ndlesiecki@yahoo.com]
> Sent: 06 July 2003 17:15
> To: Cactus Developers List
> Subject: Unit tests for server side code?
> 
> Hi guys,
> '
> I notice we don't have any unit tests for server-side cactus code, or
at
> least, that's what's implied by the following comment:
> 
> " Run all the unit tests of Cactus that do not need a servlet
environment
> to
> run. These other tests will be exercised in the sample application."
> 
> (From TestAll.java--plus I didn't find any.)
> 
> This strikes me as less than desirable, since it makes it hard to
test-
> drive
> my addition of unique keys. After all, the behavior should be
transparent
> from an "integration test" standpoint.

I don't understand. There are two kinds of unit tests: logic unit test,
tested in isolation and integration unit tests. Logic unit test is
executed in the cactus framework project and iut in the sample-servlet
one. What's wrong with this?

> 
> So, I toyed with the idea of starting to add at least one test (to the
> class
> I was modifying). That prompted me to ask the question: which mock
> framework
> should we use to support our "server-side" unit tests? I'm in favor of
> easymock, since I know it well. However, I feel that the rest of the
team
> may have more thoroughly researched opinions than mine on the subject.

Yeah, we've not had to use any mockobject fwk so far and you're right we
need to pick one for our logic unit tests. I personally prefer DynaMock.
I find EasyMock too verbose. I'm including an example project comparing
the two (it also compares Cactus with them). Of course the example is
really simplistic but when the examples become more complex, DynaMock
shines.

-Vincent

> 
> Cheers,
> Nick
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-dev-help@jakarta.apache.org


Mime
View raw message