You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Amit Ajmani <am...@gmail.com> on 2009/07/10 17:14:26 UTC
Test my Server through Junit
Hi All ,
How can i test my server through Junit. ?
I want to test my ProtocolDecoderFilter and IOHandler. basically my client
open a connection with server and send bytes which i filtered using
CumulativeProtocolDecoderFilter and wrapped the bytes into high level object
and passed to IOhandler. and sends response back to client.
How could i test my server for above using Junit.
Any suggestions
Thanks
Amit
Re: Test my Server through Junit
Posted by David Rosenstrauch <da...@darose.net>.
Amit Ajmani wrote:
> Hi All ,
>
> How can i test my server through Junit. ?
>
> I want to test my ProtocolDecoderFilter and IOHandler. basically my client
> open a connection with server and send bytes which i filtered using
> CumulativeProtocolDecoderFilter and wrapped the bytes into high level object
> and passed to IOhandler. and sends response back to client.
>
> How could i test my server for above using Junit.
>
> Any suggestions
>
> Thanks
>
> Amit
In an earlier message I described a technique for doing. In a nutshell:
rather than doing a full-blown start-up of the server, and opening a
connection to it, you simulate it. You set up a dummy server
environment for your decoders/handlers, send a message to it, and then
verify the response that comes back.
Details - and sample code - here:
http://www.nabble.com/Re%3A-Exceptions-in-MINA-p23930764.html
HTH,
DR