Re: Emulating AJAX polling requests
Marc Holden <[email protected]>
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <CADV_OVVMS2VTEe6sfMzO_M2iU7ThF_PUJ43EAf2wUpYE+K1opw@mail.gmail.com> |
You can put the xhr request in its own TestRunner and call grinder.startWorker to fire off the request. If you need to know when the worker is done, add a variable which you poll periodically. Hope this helps... -Marc On Nov 13, 2013 4:24 PM, "Heintz, Timothy J CTR (US)" <theintz-RD6IL/yZvvVWk0Htik3J/[email protected]> wrote: > The problem is not in recording the request, but in executing it a > separate thread. > > Grinder appears to not allow calling an instrumented method from any > thread other than the main "worker" thread that invoked by the TestRunner. > > Tim > On 11/13/2013 12:31 PM, Ravi Joshi wrote: > > If JavaScript is sending any HTTP request, then you can record this > scenario using TCP-Proxy. Once you have the recorded script, you can do > little modification as per the requirement. > > -Ravi Joshi > > > On Wednesday, 13 November 2013 12:39 AM, "Heintz, Timothy J CTR (US)" > <theintz-RD6IL/yZvvVWk0Htik3J/[email protected]> <theintz-RD6IL/yZvvVWk0Htik3J/[email protected]> wrote: > Hi, > > We have an web application in which JavaScript periodically polls the > server. > > To emulate this, I created a Python Thread that periodically executes a > callback to an instrumented TestRunner method, the executes the poling > request. > > This approach generated the following error: "Only Worker Threads can > invoke tests". Apparently Grinder does not allow Python-created > threads to execute instrumented methods. > > Is there another way this task can be accomplished? > > Thanks, > > Tim > > > > ------------------------------------------------------------------------------ > DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps > OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access > Free app hosting. Or install the open source package on any LAMP server. > Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! > http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk > _______________________________________________ > grinder-use mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/grinder-use > > > > > > ------------------------------------------------------------------------------ > DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps > OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access > Free app hosting. Or install the open source package on any LAMP server. > Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! > http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk > _______________________________________________ > grinder-use mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/grinder-use > > ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ grinder-use mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use