Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 98255 invoked from network); 14 Mar 2004 03:51:53 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 14 Mar 2004 03:51:53 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1B2MfT-0005co-00 for ; Sun, 14 Mar 2004 04:52:03 +0100 Received: from pool-162-83-161-37.ny5030.east.verizon.net ([162.83.161.37]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Mar 2004 04:52:02 +0100 Received: from carcassi by pool-162-83-161-37.ny5030.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Mar 2004 04:52:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: cactus-user@jakarta.apache.org From: "Gabriele Carcassi" Subject: Re: Testing client server communication Date: Sat, 13 Mar 2004 22:50:33 -0500 Lines: 73 Message-ID: References: <002501c4093d$ba397800$2502a8c0@vma> X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pool-162-83-161-37.ny5030.east.verizon.net X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Vincent, Thanks, I see it more clearly now, and will simply use mock objects. I knew I was doing something wrong, but couldn't really put my finger on it. I had read thousands time before that cactus is for server side, but I guess it didn't really "click" until today. I got stuck into thinking: well, I want to test also the server... In fact, I think I will use cactus to test my application, just not these test cases... Thanks again! Gabriele "Vincent Massol" wrote in message news:002501c4093d$ba397800$2502a8c0@vma... > Hi Gabriele, > > Cactus is about *unit testing* *server side* components. It doesn't > address client side unit tests nor functional end 2 end tests. > > Thus I confirm Cactus is not adequate for your need. > > Why don't you simply use JUnit + mock objects/stubs? > > Thanks > > -Vincent > Wanna see JUnit in Action? > (http://manning.com/massol) > > > -----Original Message----- > > From: news [mailto:news@sea.gmane.org] On Behalf Of Gabriele Carcassi > > Sent: 13 March 2004 19:20 > > To: cactus-user@jakarta.apache.org > > Subject: Testing client server communication > > > > Hi all, > > > > I don't seem to find a clever way to use cactus to test the > client/server > > communication of my application. I wonder if any of you can provide > with > > an > > insight, or can confirm that cactus is not sufficient. > > > > I have two classes, Client and Server. The first has a set of > > Client.fireXxx, and the other has a corresponding set of Server.onXxx. > > Calling Client.fireXxx will trigger an http client to connect to a > > servlet, > > which then calls the Server.onXxx methods. > > > > I want to test the communication: in the setUp pop up the client and a > > mock > > server, and have a testXxx call the Client.fireXxx and test whether > the > > mock > > server received onXxx. > > > > How would you do it? > > > > Thanks, > > Gabriele > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: cactus-user-help@jakarta.apache.org