Sheldon Wosnick wrote:
> 
> Laurent,
> 
> Thank you and perhaps I was too verbose. I understand the structure of the
> runtime and the classpath. What I don't understand is why certain test
> classes (the code you write, not the runtime distribution from Cactus) are
> duplicated on the client and the server. I have read the classpath setup at
> http://jakarta.apache.org/cactus/howto_classpath.html but
> 
> "What's missing" is what test case code goes on the client side and what
> test case code goes on the server-side -- not where to put it, not what jars
> and configuration files.
> 
> Ok, here is what I mean. For a simple servlet redirector test case, say
> TestCase1, what would be the structure on the client and on the server?
> 
> Am I missing something that this seems so obvious from a reading of the
> various literature in print on using Cactus, I am led to believe that there
> is an intentional duplication of some classes on both the client and the
> server and I am trying to understand that.


Sheldon, the duplication is intentional - read the docs more closely :)

The testcase class has to be in two places - on client and server side -
as it is RUN in two places. A JUnit testrunner will run the beginXXXX
and endXXXX methods of a testcase on the client side, then the second
identical copy of the class will be used by the server to run the setUp,
testXXXX and tearDown methods on the server.

So, in other words, write one TestCase class, and always deploy to both
client and server.

Jari

-- 
Jari Worsley
Head of Development
Hyperlink Interactive Ltd
Tel: 020 7240 8121

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to