Philip Aston | 1 May 2008 16:00

Re: New user to Grinder

Yvonne Li wrote:
>
> I just started to learn Grinder. May I ask a simple question: how do I
> convert the result file (saved from console) *.data to an excel file
> or other kind of file? Basically I just want to email it to developer
> so they can view it easily.
>
>  
>

If you open the file with Excel (at least 2003), you'll get the "Text
Import Wizard". Make sure it selects "tab delimited" and it should
import just fine.

You can also copy and paste directly from the console into Excel.

- Phil

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc., 
its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual or entity named in this message.
If you are not the intended recipient, and have received this message in error, please immediately return
this by email and then delete it.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
(Continue reading)

Fan Yang | 8 May 2008 19:28
Picon

turn off URL encoding


I am using Grinder3 patch 33. I have the following code snipets. It 
fails because
the URL returned in step 16 contains / and % (URL encoded already).

By passing it to step 17, Grinder URL encoded the URL one more time 
before reqeusting the server for the URL.
That confused the server.

How do I turn off temporarily the URL encoding as I am sure the returned 
URL from the previous step is correct already.

        resp=tests[16].GET(nextURL)                            
        nextURL=resp.getHeader('Location')       
        print '2: nextURL=' + nextURL

        resp=tests[17].GET(nextURL)                            
        nextURL=resp.getHeader('Location')

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Philip Aston | 11 May 2008 15:53
Picon
Gravatar

Re: turn off URL encoding

Fan Yang wrote:
> I am using Grinder3 patch 33. I have the following code snipets. It 
> fails because
> the URL returned in step 16 contains / and % (URL encoded already).
>
> By passing it to step 17, Grinder URL encoded the URL one more time 
> before reqeusting the server for the URL.
> That confused the server.
>
> How do I turn off temporarily the URL encoding as I am sure the returned 
> URL from the previous step is correct already.
>
>         resp=tests[16].GET(nextURL)                            
>         nextURL=resp.getHeader('Location')       
>         print '2: nextURL=' + nextURL
>        
>         resp=tests[17].GET(nextURL)                            
>         nextURL=resp.getHeader('Location')
>   

I don't believe there's a way to disable the escaping. Try this instead:

    from HTTPClient import URI

    # ...

    nextURL=URI.unescape(resp.getHeader('Location'), None)

- Phil

(Continue reading)

indu.k.gajjala | 13 May 2008 17:24
Picon
Favicon

Does Grinder report time out errors?

Hi,

 

I tried recording test scripts on a portlet application with The Grinder. I recorded the test scripts when the application functions normally. I then reduced the portlet timeout setting to 1 second. I did this to create a timeout error and see how The Grinder records these errors when the test scripts are executed. But, I found that no errors were reported, be it in the grinder console or the logs. There were no HTTP response errors too.

 

Can I know if The Grinder actually reports time out errors? This is crucial for testing our application. Can you please reply as soon as possible?

 

Thanks,

Kaladhar

 

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Calum Fitzgerald | 13 May 2008 17:55
Picon

Re: Does Grinder report time out errors?

It depends entirely on what HTTP response your application gives when
it times out. Using a firefox with something live livehttpheaders what
HTTP Response does your application give when it times out?

If it gives an HTTP 200 and writes a nice error message to the
response, then you can parse the response and use a reg ex to match
the error message, you can then raise an error and exit that
particular test. This will give you your error in the logs.

first you need to be sure of what your application is actually returning.

Cheers
Cal

2008/5/13  <indu.k.gajjala@...>:
>
>
>
>
> Hi,
>
>
>
> I tried recording test scripts on a portlet application with The Grinder. I
> recorded the test scripts when the application functions normally. I then
> reduced the portlet timeout setting to 1 second. I did this to create a
> timeout error and see how The Grinder records these errors when the test
> scripts are executed. But, I found that no errors were reported, be it in
> the grinder console or the logs. There were no HTTP response errors too.
>
>
>
> Can I know if The Grinder actually reports time out errors? This is crucial
> for testing our application. Can you please reply as soon as possible?
>
>
>
> Thanks,
>
> Kaladhar
>
>
>
>
>
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
> -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
>  grinder-use mailing list
>  grinder-use@...
>  https://lists.sourceforge.net/lists/listinfo/grinder-use
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Pierre.Deslandes | 13 May 2008 19:26
Favicon

Modifying grinder script scenarios


Hi,

Anybody knows how to, under TheGrinder verson3, modify the Jython script scenarios to replace hardcoded string with variable values ?

I tried with prefixing the variable name with $, but it does not work.

For example, I tried to replace the

    result = request301.POST('/cwf/e',
      ( NVPair('i', '5'),
        NVPair('a', 'pressScriptButton'),
        NVPair('f.0100', 'desl'),
        NVPair('f.0200', 'desl'), ),
      ( NVPair('Content-Type', 'application/x-www-form-urlencoded'), ))


with

    userId = 'desl'
    password = 'desl'
    result = request301.POST('/cwf/e',
      ( NVPair('i', '5'),
        NVPair('a', 'pressScriptButton'),
        NVPair('f.0100', $userId),
        NVPair('f.0200', $password), ),
      ( NVPair('Content-Type', 'application/x-www-form-urlencoded'), ))

Thanks,

Pierre
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Pierre.Deslandes | 13 May 2008 19:39
Favicon

RE Modifying grinder script scenarios


Hi,

I tried just writing the variable name, and it got correctly substituted. So the following works fine :

    userId = 'desl'
   password = 'desl'
   result = request301.POST('/cwf/e',
     ( NVPair('i', '5'),
       NVPair('a', 'pressScriptButton'),
       NVPair('f.0100', userId),
       NVPair('f.0200', password), ),
     ( NVPair('Content-Type', 'application/x-www-form-urlencoded'), ))

Thanks,

Pierre






Pierre.Deslandes <at> videotron.com
Envoyé par : grinder-use-bounces <at> lists.sourceforge.net

2008-05-13 13:27

Veuillez répondre à
grinder-use <grinder-use-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>

A
<grinder-use-5NWGOfrQmneRv+LV9MX5uv+2+P5yyue3@public.gmane.orgt>
cc
Objet
[Grinder-use] Modifying grinder script scenarios






Hi,

Anybody knows how to, under TheGrinder verson3, modify the Jython script scenarios to replace hardcoded string with variable values ?

I tried with prefixing the variable name with $, but it does not work.

For example, I tried to replace the

   result = request301.POST('/cwf/e',
     ( NVPair('i', '5'),
       NVPair('a', 'pressScriptButton'),
       NVPair('f.0100', 'desl'),
       NVPair('f.0200', 'desl'), ),
     ( NVPair('Content-Type', 'application/x-www-form-urlencoded'), ))


with

   userId = 'desl'
   password = 'desl'
   result = request301.POST('/cwf/e',
     ( NVPair('i', '5'),
       NVPair('a', 'pressScriptButton'),
       NVPair('f.0100', $userId),
       NVPair('f.0200', $password), ),
     ( NVPair('Content-Type', 'application/x-www-form-urlencoded'), ))

Thanks,

Pierre -------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
grinder-use mailing list
grinder-use-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/grinder-use

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
olivier merlin | 14 May 2008 11:55
Picon

Problem with HTTP GET request

Hello,

I get this when i launch 100 threads doing a HTTP Get on a 40M resource.

Caused by: java.lang.OutOfMemoryError: Java heap space
    at HTTPClient.HTTPResponse.readResponseData(HTTPResponse.java:981)
    at HTTPClient.HTTPResponse.getData(HTTPResponse.java:515)
    at net.grinder.plugin.http.HTTPRequest$AbstractRequest.getHTTPResponse(HTTPRequest.java:889)
    at net.grinder.plugin.http.HTTPRequest.GET(HTTPRequest.java:385)
    at net.grinder.plugin.http.HTTPRequest.GET(HTTPRequest.java:331)


I thought that the HTTP GET data give only a reference to a  getInputStream()
and that i could read the InputStream without buffering it whith a code in jython like this :

def readInputStream(dataStream):
       bufferSize=1024
        b= jarray.zeros(bufferSize, "b")
        length=0
        try: 
            chunk=2     
            while chunk!=-1 :
                chunk = dataStream.read(b)
                length+=chunk

        except Exception, err:
            print ("ERROR Function write_to_file_EASY : %s" % (err))
            print (traceback.print_exc())
            return length
        return length


I was apparently wrong .
Is there a way to do this : doing a HTTPRequest.GET() without reading explicitely the InputStream() ??


Thanks for your help,
Olivier

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Philip Aston | 14 May 2008 13:15

Re: Problem with HTTP GET request


The HTTPRequest class always reads the entire body of the response so
that it can calculate the statistics for the whole request.

You could use an HTTP library directly (perhaps HTTPClient) to avoid this.

- Phil

olivier merlin wrote:
> Hello,
>
> I get this when i launch 100 threads doing a HTTP Get on a 40M resource.
>
> Caused by: java.lang.OutOfMemoryError: Java heap space
>     at HTTPClient.HTTPResponse.readResponseData(HTTPResponse.java:981)
>     at HTTPClient.HTTPResponse.getData(HTTPResponse.java:515)
>     at
> net.grinder.plugin.http.HTTPRequest$AbstractRequest.getHTTPResponse(HTTPRequest.java:889)
>     at net.grinder.plugin.http.HTTPRequest.GET(HTTPRequest.java:385)
>     at net.grinder.plugin.http.HTTPRequest.GET(HTTPRequest.java:331)
>
>
> I thought that the HTTP GET data give only a reference to a 
> getInputStream()
> and that i could read the InputStream *without buffering it* whith a
> code in jython like this :
>
> def readInputStream(dataStream):
>        bufferSize=1024
>         b= jarray.zeros(bufferSize, "b")
>         length=0
>         try: 
>             chunk=2     
>             while chunk!=-1 :
>                 chunk = dataStream.read(b)
>                 length+=chunk
>
>         except Exception, err:
>             print ("ERROR Function write_to_file_EASY : %s" % (err))
>             print (traceback.print_exc())
>             return length
>         return length
>
>
> I was apparently wrong .
> Is there a way to do this : doing a HTTPRequest.GET() without reading
> explicitely the InputStream() ??
>
>
> Thanks for your help,
> Olivier

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc., 
its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual or entity named in this message.
If you are not the intended recipient, and have received this message in error, please immediately return
this by email and then delete it.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Trilok Khairnar | 15 May 2008 08:34
Picon

Re: Problem with HTTP GET request

Apache's httpClient is probably the best http library in Java out there.

There's a compaison on JMatrix.

Regards,

Trilok


On 5/14/08, Philip Aston <paston-2Tjm5za6O7k@public.gmane.org> wrote:

The HTTPRequest class always reads the entire body of the response so
that it can calculate the statistics for the whole request.

You could use an HTTP library directly (perhaps HTTPClient) to avoid this.

- Phil


olivier merlin wrote:
> Hello,
>
> I get this when i launch 100 threads doing a HTTP Get on a 40M resource.
>
> Caused by: java.lang.OutOfMemoryError: Java heap space
>     at HTTPClient.HTTPResponse.readResponseData(HTTPResponse.java:981)
>     at HTTPClient.HTTPResponse.getData(HTTPResponse.java:515)
>     at
> net.grinder.plugin.http.HTTPRequest$AbstractRequest.getHTTPResponse(HTTPRequest.java:889)
>     at net.grinder.plugin.http.HTTPRequest.GET(HTTPRequest.java:385)
>     at net.grinder.plugin.http.HTTPRequest.GET(HTTPRequest.java:331)
>
>
> I thought that the HTTP GET data give only a reference to a
> getInputStream()
> and that i could read the InputStream *without buffering it* whith a
> code in jython like this :
>
> def readInputStream(dataStream):
>        bufferSize=1024
>         b= jarray.zeros(bufferSize, "b")
>         length=0
>         try:
>             chunk=2
>             while chunk!=-1 :
>                 chunk = dataStream.read(b)
>                 length+=chunk
>
>         except Exception, err:
>             print ("ERROR Function write_to_file_EASY : %s" % (err))
>             print (traceback.print_exc())
>             return length
>         return length
>
>
> I was apparently wrong .
> Is there a way to do this : doing a HTTPRequest.GET() without reading
> explicitely the InputStream() ??
>
>
> Thanks for your help,
> Olivier



Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
grinder-use mailing list
grinder-use-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/grinder-use

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Gmane