Quantcast

Executing JavaScript on Result

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Executing JavaScript on Result

Barnt, Kenneth Sean
I hope that there is a solution for this, and that I haven’t overlooked it in my Googling and searching the archives of this list.

I’m working on building out load tests for Blackboard Learn, and one of the hiccups we’ve run into is that nearly every form has a hidden nonce input that’s required with the submission for it to work. We’ve been able to make this work in most cases by pulling that value from the result of the page load, but there is at least one special case that we haven’t been able to figure out.

In the discussion boards, clicking the reply button executes some JavaScript that modifies the DOM on that page to add the form (including the input with the nonce). Without that JS executing there is no nonce value for us to scrape and submit, so we’re unable to post replies in a discussion board.

Does anyone know of a way that we can execute the JS to get the form to be generated so we can grab that nonce?

Thanks,
Kenny

--
Kenneth S. Barnt
Application Administrator
Office of Information Technology
Central Michigan University
989-774-2591

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Executing JavaScript on Result

Gary Mulder-3
On 29 April 2015 at 13:45, Barnt, Kenneth Sean <[hidden email]> wrote:

Does anyone know of a way that we can execute the JS to get the form to be generated so we can grab that nonce?

You'd need a JS interpreter to execute the JS. In theory you could use something like Rhino:


Not sure however whether you could get it to work and there might be some performance issues on The Grinder side depending on how much JS you need to concurrently execute.

Regards,
Gary
 

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Executing JavaScript on Result

Ouray Viney
In reply to this post by Barnt, Kenneth Sean
I have dealt with this before.  From my experience, you can replicate the JS code in your Grinder script (utility code).  Grinder does not instrument JavaScript.  You may have already read this in the docs here: http://grinder.sourceforge.net/g3/features.html and http://grinder.sourceforge.net/faq.html.

I am guessing this nonce is passed in the HTTP request?  If it is, then you would inject the data generated by your Grinder utility code (emulating the JavaScript).

HTH



On Wed, Apr 29, 2015 at 8:45 AM, Barnt, Kenneth Sean <[hidden email]> wrote:
I hope that there is a solution for this, and that I haven’t overlooked it in my Googling and searching the archives of this list.

I’m working on building out load tests for Blackboard Learn, and one of the hiccups we’ve run into is that nearly every form has a hidden nonce input that’s required with the submission for it to work. We’ve been able to make this work in most cases by pulling that value from the result of the page load, but there is at least one special case that we haven’t been able to figure out.

In the discussion boards, clicking the reply button executes some JavaScript that modifies the DOM on that page to add the form (including the input with the nonce). Without that JS executing there is no nonce value for us to scrape and submit, so we’re unable to post replies in a discussion board.

Does anyone know of a way that we can execute the JS to get the form to be generated so we can grab that nonce?

Thanks,
Kenny

--
Kenneth S. Barnt
Application Administrator
Office of Information Technology
Central Michigan University
<a href="tel:989-774-2591" value="+19897742591">989-774-2591

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use



--

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Loading...