Interesting issue with JMeter and ADF.
There is an excellent post by Chris Muir on his old blog about how to configure JMeter for ADF (Chris’ current blog is here), so I’m not covering all of that, just an interesting issue I found while running some tests.
Long-story-short: The afrLoop variable can vary in size from server to server, and change over time, so your parser may need to change.
Back in December I needed to setup some load tests for a couple of ADF apps I was working on. I had used JMeter before, but hadn’t used it with an ADF app. Fortunately a Google search found the blog post linked above, and after following through the post I had some working tests for both my apps.
Fast-forward about 4.5 months, and I need to run some more load tests. so I open up JMeter, load up my tests from December, and run…all of my page requests are returning a “Because of inactivity, your session has timed out and is no longer active. Click OK to reload the page” from my ADF app.
Why did these tests that worked great in December just stop working? I hadn’t changed versions of any of the software involved (JMeter, WebLogic, ADF, etc.). Time to do some detective work.
I started tracing through the requests sent and responses received by the steps in my test case and noticed that the adf.ctrl-state variable was not being set. Looking through the response for the step where it should first get set I didn’t notice anything wrong at first, but just by chance I happened to notice that the afrLoop variable my test was setting and sending for that step was 1 digit short (the one in the file ended in a double-7, mine had one 7, so it was easy to spot).
Turns out, my parser for the afrLoop variable was pulling 16 characters from the response, but the afrLoop value being sent was 17 characters. Doing some further tests I found that across various servers (JDev integratedWLS, QA/PreProd/Prod) the length of the afrLoop value being returned was 15, 16 or 17. On the server I was running my tests against it was 17, though back in December a length of 16 had worked just fine on the same server.
So, I increased the number of characters being grabbed by my parser from 16 to 17 and bingo, my tests worked just fine again.