The topic of this post is to illustrate the mechanism of configuring Apache JMeter with your Oracle ADF application for stress testing. Because of the lack of a fully and detailed configuration for ADF, next I’ll present a demo Test Plan which can be downloaded HERE. More information and alternative scenarios can be found at this link.
The classically way of creating a scenario with JMeter is to configure a proxy server related to a Test Plan and to start recording specific application flows from the browser. When you’re done you can stop the recording and run the created Test Plan with the desired number of threads and looping parameters.
When considering using JMeter for JDeveloper 11g ADF applications there are some additional parameters to be configured to be sure that the response data is according to the items recorded into a test plan: jsessionId, afrLoop, javax.faces.ViewState, afrWindowId. In order to simulate different user sessions we need to capture those parameters values and to be carried when running a flow based on multiple HTTP request.
... var sess = ";jsessionid=R7MnNvWQ3jQk8Tm32vr6h9WjbdQF7ZrXZVrgwnsZJ782QGQRwz4h!1237683425"; ... query = query.replace(/_afrLoop=\d*/, "_afrLoop=2530627673795511"); ...
In order to configure JMeter with your ADF application the first step is to create User Defined Variables via your Test Plan for each parameter presented above.
The next step is to configure Regular Expression Extractor for each variable to be set up after recording a session with JMeter and to be used for simulating different HTTP requests related to the current session state:
Any path that makes reference to the current session must point to the extracted jsessionId variable. Also, if any of the others parameters appears in the URL request, they must be substituted with the correspondent extracted values.
Also it is important to configure properly the HTTP Header Manager according to each request (to specify the parameters presented in the attached demo file).
If you want for test threads to pass application’s security (in a form based like ADF security), you must configure the j_security_check HTTP request and specify the values for the j_username and the j_password send parameters with the request (method POST).
Oracle JRockit Mission Control can be used for monitoring runtime parameters(e.g. memory, threads) or memory leaks according to different running Test Plans. According to your needs, you can use many listeners from JMeter for test monitoring or assertions to verify response conditions.