Re: How to grind a Wicket application

Rafael Barrera Oro <[email protected]> Tue, 23 Sep 2014 14:10:41 -0300
Newsgroups gmane.comp.java.grinder.user
Message-ID <CAKnyy01NZFbyajAPAmW4EXPbm9qu5EU1qccAO8KpKy9q=a8bsA@mail.gmail.com>
Hello!

To begin with, thanks for the replies.

I'd like to say i am fairly new at this, that is why (having in my mind
some troublesome experiences with Wicket) i went straight for the custom
python script (the har2grinder script) instead of using the Grinder proxy
tool. I'll try the latter instead then.

Regarding the generated script, its fairly simple, most of it is just
static resources fetching. Also, all the request that fail in the script
work when pasted directly in the browser.

I'll try using the grinder proxy before trying more complex solutions.

Thank you all!
Rafael

2014-09-23 5:24 GMT-03:00 Joan Picanyol i Puig <[email protected]>:

> * Rafael Barrera Oro <[email protected]> [20140922 20:22]:
> > My goal is to use The Grinder to stress/load test a fairly big (3000
> users
> > aprox) Wicket application.
>
> > For this i started by recording some basic usage using the chrome
> > devtools and then generating a python file using the har2grinder
> > python script (very basic usage, just navigating to the login screen
> > and logging in to the application).
> >
> > I've noticed in the agent logs that all the request result in a 400 bad
> > request code, however, the final ammount of errors is zero, so i suspect
> i
> > am making a basic mistake somewhere.
> >
> > Anyway, i wanted to ask you if you had any experience in the subject
> (with
> > or without exporting the HAR)
>
> I'm unsure about what the har2grinder does, but grinder's default XSLT
> for proxy recording-based python script generation does not fail the
> tests on HTTP error codes (see
> http://sourceforge.net/p/grinder/mailman/message/32111509/).
>
> You could try modifying your script by overwriting HTTPRequest:
>
> class MyHTTPRequest(HTTPRequest):
>     def __init__(self, url):
>         HTTPRequest.__init__(self)
>         if url: self.url = url
>         self.swallow = False
>
>     def __init__(self, url, swallow=False):
>         HTTPRequest.__init__(self)
>         if url: self.url = url
>         self.swallow = swallow
>
>     def processResponse(self, response):
>         if response.statusCode >= 400:
>             msg = "%(url)s KO %(status)s: %(msg)s" % (
>                     {
>                     "status": response.getStatusCode(),
>                     "msg": response.text, "url": response.effectiveURI}
>                     )
>             print(msg)
>             log(msg)
>             if not self.swallow:
>                 raise Exception(response.text)
>
> and using this version in those tests you wish to fail (assuming
> har2grinder
> generates scripts similar to grinder's TCPProxy HTTP filter):
>
> def createRequest(test, url, headers=None):
>     """Create an instrumented HTTPRequest."""
>     request = MyHTTPRequest(url=url)
>     if headers: request.headers = headers
>     test.record(request.GET)
>     test.record(request.POST)
>     test.record(request.PUT)
>     test.record(request.DELETE)
>     test.record(request.TRACE)
>     test.record(request.HEAD)
>     test.record(request.OPTIONS)
>     return request
>
>
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> grinder-use mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/grinder-use
>

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk

_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use