Henner,

You seem to know the expected value so why bother? What value are you
expecting in your endXXX() method? 2.3? Then check if that's the value
received. Of course in testXXX() you should set the locale so that you
can control the environment of your test.

That's really the main point. When writing unit tests you must control
completely your environment from your tests so that your tests are
reproducible.

The Cactus architecture says the client and server parts execute in
different JVM. The fact that the Eclipse plugin was executing in the
same VM is pure luck and may change in any future version of the plugin
(it's not a feature - it's an implementation detail that should not be
relied upon).

There's currently no easy way to pass information from server to client
(apart from HTTP cookies, HTTP headers and response content). You should
always try not to pass anything because doing so shows that you are not
controlling your test, i.e. the expected value is not fixed and
controlled.

Hope this makes sense

Thanks
-Vincent

> -----Original Message-----
> From: Henner Kollmann [mailto:[EMAIL PROTECTED]
> Sent: 30 November 2003 09:19
> To: 'Cactus Users List'
> Subject: AW: Transferring data between client and server side
> 
> Vincent,
> 
> I want to initialize a double variable in the very beginning of the
test
> with a value e.g. 2.3. Then i want to sent it to the client side look
if
> it's really there. On the way to the client side this variable is
> transformed to text according current to locale, e.g. german. So on
the
> client side it looks like 2,3.  On the way back in the server this
> variable
> is transformed again to double according the previous used locale. The
> result should be 2.3 again.
> 
> The transformer objects are initialized on the server side. I need
them on
> the client side to do a first test if the variables on the client side
are
> transformed correct.
> 
> Using the eclipse plugin this works. I think because the eclipse
plugin
> let
> the client and server side run in the same virtual machine.
> 
> Using the maven plugin this do not works because both run in different
> machine.
> 
> Hope that it is clearly now!
> 
> Regards,
> Henner
> 
> > Henner,
> >
> > What is your use case? I've not seen yet a use case where
> > this was needed and I'm curious.
> >
> > Thanks
> > -Vincent
> >
> > > -----Original Message-----
> > > From: Henner Kollmann [mailto:[EMAIL PROTECTED]
> > > Sent: 01 November 2003 15:47
> > > To: [EMAIL PROTECTED]
> > > Subject: Transferring data between client and server side
> > >
> > > Hi all,
> > >
> > > Any idea how i can share data between testXXX and endXXX methods?
> > >
> > > E.g. i have a varialbe wich should be initialized in the testXXX
> > method
> > > and
> > > i want use this object in the endXX method to test.
> > >
> > > This works if i use the eclipse plugin with an static variable. If
i
> > let
> > > the
> > > maven task run for testing the static variable setted in
> > the testXXX
> > > method is always null.
> > >
> > > Any idea?
> > >
> > > Thanks,
> > > Henner
> > >
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to