[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grinder-use
Subject:    Re: [Grinder-use] FW:  Grinder for swing app
From:       Philip Aston <philip.aston () oracle ! com>
Date:       2009-08-16 14:58:27
Message-ID: 4A881E93.7090701 () oracle ! com
[Download RAW message or body]

You're using Java Web Start, right? You need to figure out how to
configure JWS to communicate via an HTTP proxy, and then point it at the
TCP proxy.

- Phil

Ashwini Nambiar wrote:
> Resending ...
>
> Here is exactly what my generated script contained when I used the
> client application:
>
> # The Grinder 3.2
> # HTTP script recorded by TCPProxy at Aug 14, 2009 11:17:27 AM
>
> from net.grinder.script import Test
> from net.grinder.script.Grinder import grinder
> from net.grinder.plugin.http import HTTPPluginControl, HTTPRequest
> from HTTPClient import NVPair
> connectionDefaults = HTTPPluginControl.getConnectionDefaults()
> httpUtilities = HTTPPluginControl.getHTTPUtilities()
>
> # To use a proxy server, uncomment the next line and set the host and
> port.
> # connectionDefaults.setProxyServer("localhost", 8001)
>
> # These definitions at the top level of the file are evaluated once,
> # when the worker process is started.
>
>
> class TestRunner:
>   """A TestRunner instance is created for each worker thread."""
>
>   def __call__(self):
>     """This method is called for every run performed by the worker
> thread."""
>
>     # Empty recording!
>     pass
>
>
> def instrumentMethod(test, method_name, c=TestRunner):
>   """Instrument a method with the given Test."""
>   unadorned = getattr(c, method_name)
>   import new
>   method = new.instancemethod(test.wrap(unadorned), None, c)
>   setattr(c, method_name, method)
>
>
> How do I get the TCP Proxy to record the client server communication.
> It is on http using serialized java objects.
>
> Thanks,
> Ashwini
> *
> *
>
>     ------ Forwarded Message
>     *From: *Ashwini Nambiar <ashwini.nambiar@pearson.com>
>     *Date: *Fri, 14 Aug 2009 10:52:47 -0700
>     *To: *grinder-use <grinder-use@lists.sourceforge.net>
>     *Conversation: *[Grinder-use] Grinder for swing app
>     *Subject: *Re: [Grinder-use] Grinder for swing app
>
>
>
>     I ran the TCP Proxy to record network traffic and the script it
>     generates is  blank.
>     This is because my client app starting using Java Web start is
>     communicating to the client using serialized Java objects.
>
>     Thanks for you reply below that tells me that I can extend The
>     Grinder so it can understand these serialized objects.
>     What is not clear to me is where do I put this stuff that Phil
>     mentions below:
>
>     "/requestParameter = ... # create parameter using Java classes
>     requestBytes = serialise(requestParameter) response =
>     myRequest.POST(url, requestBytes) # Using HTTPRequest
>     responseObject = deserialise(response.data) where serialise() and
>     deserialise() would use Java ObjectOutputStream, ObjectInputStream
>     to do Java serialisation to and from byte arrays./"
>
>     My script is blank.
>     The script contains stuff if I use other websites.
>
>     Thanks,
>     Ashwini
>
>
>
>
>     On 8/7/09 6:03 AM, "Trilok Khairnar" <trilokgk@gmail.com> wrote:
>
>         Short answer is yes. Alternatively, you can use a Java aware
>         proxy like Rabbit in the middle to handle the serialization,
>         deserialization. Phil's answer in the following snippet from
>         the archives should help. -Trilok <snippet> ----------
>         Forwarded message ---------- From: Philip Aston
>         <paston@bea.com> Date: Tue, Mar 6, 2007 at 4:14 AM Subject:
>         Re: [Grinder-use] Java thick-client applications serialised
>         objects To: grinder-use <grinder-use@lists.sourceforge.net>
>         Terence Walsh wrote: > >     Using "The Grinder 3" now, and
>         have a project that is java human >     machine interface
>         hooked up to a server but passing data through >    
>         serialisation of objects over HTTPS. > >     What is the best
>         approach to this. > >     My thoughts are the following: > >  
>           Read through the development code and take out the
>         references >     (methods) where the connection's are occuring
>         reimplement them in >     jython and hit the server that way
>         by calling the local methods. >     Obviously i dont care
>         about the interface etc so id need to just >     call the
>         methods relating to comms with the server. > >     Anyone have
>         any better ideas / suggestions ? > Well, it sounds like you
>         have a custom request/reply protocol built on HTTP. Presumably
>         you can do something like: requestParameter = ... # create
>         parameter using Java classes requestBytes =
>         serialise(requestParameter) response = myRequest.POST(url,
>         requestBytes) # Using HTTPRequest responseObject =
>         deserialise(response.data) where serialise() and deserialise()
>         would use Java ObjectOutputStream, ObjectInputStream to do
>         Java serialisation to and from byte arrays. - Phil </snippet>
>         On Fri, Aug 7, 2009 at 4:10 AM, Ashwini
>         Nambiar<ashwini.nambiar@pearson.com> wrote: > Is it possible
>         to use Grinder to performance test the back end of  a swing >
>         application? The client-server communication is via http and
>         uses serialized > java objects? > > Thanks, > Ashwini > >
>         ------------------------------------------------------------------------------
>         > Let Crystal Reports handle the reporting - Free Crystal
>         Reports 2008 30-Day > trial. Simplify your report design,
>         integration and deployment - and focus > on > what you do
>         best, core application coding. Discover what's new with >
>         Crystal Reports now.  http://p.sf.net/sfu/bobj-july >
>         _______________________________________________ > grinder-use
>         mailing list > grinder-use@lists.sourceforge.net >
>         https://lists.sourceforge.net/lists/listinfo/grinder-use > >
>         ------------------------------------------------------------------------------
>         Let Crystal Reports handle the reporting - Free Crystal
>         Reports 2008 30-Day trial. Simplify your report design,
>         integration and deployment - and focus on what you do best,
>         core application coding. Discover what's new with Crystal
>         Reports now.  http://p.sf.net/sfu/bobj-july
>         _______________________________________________ grinder-use
>         mailing list grinder-use@lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/grinder-use
>
>
>
>     *
>     **Ashwini Nambiar
>     *Software Engineer, School Systems
>     (916) 288 1749
>     AIM : ashwini0902
>
>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
grinder-use mailing list
grinder-use@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/grinder-use

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic