Monday, April 14, 2014

My Shot on Using JMeter to Load Test Oracle ADF Applications

In this post, I will give my shot on using Apache JMeter to load test an Oracle ADF application.
In an ADF Insider demo Using Apache JMeter to load test an ADF applications, Chris Muir described the the use of JMeter as "very configuration heavy" because of the manual settings of the HTTP Request sampler path and parameters to their expression counterparts like "${afrLoop}" to set the values from the responses that were earlier caught by the extractors. This could become a pain especially that Oracle ADF applications has tremendous amount of ajax calls, each of which is a separate HTTP Request with relevant dynamic parameters, even on a simple interaction with the application. I thought of -what if we could eliminate such a excruciating step??? Without it, the use of JMeter with ADF could become a breeze. The challenge was accepted and now I am sharing the solution.

The solution is based from the test plan that is shared by Chris, but I added three BeanShell PreProcessors to automate the setting of the ADF parameters when they are needed and the automatic replacement of jsessionId and afr.ctrl-state in the HTTP Request Path. With these pre-procesors in place, there is no need to modify each recorded HTTP Request Sampler path and parameters. Just record and run.




Some notes:
To run use jmeter on ADF 12c you need to set the afr.Loop extractor Regex to: _afrLoop',\s*'([0-9]{13,16})
in JDeveloper 11.1.1.7 the afr.Loop extractor Regex should be: _afrLoop\",\ "([-_0-9A-Za-z]{13,16})
You can download my jmeter test plan here.