I have been using jmeter for a while with spring webflow application, I have some experience with it now that I would to share
Studying the recording of spring webflow application, I noticed the following
There are requests that doesn’t have anything inside, that are followed by requests with execution parameter as in the images below
Request without any parameters, let’s call them initial requests
Request with the “execution” parameter, let’s call them execution requests
Or it could be request with execution parameter in the query string, and the view state parameter, execution in query requests
To be able to replay the scenario, with multiple iterations, and multiple users, the execution parameters and view state needs to be parameterized, to be extracted and used in next requests to maintain the execution flow correctly
I found out by trials and from the results from the results tree, that initial requests are followed by sub samples that contains the execution parameter for the consequences request
Also found out that new execution is generated at the end of execution in query requests
But there was a difference in the extraction of the execution parameter in that case, it comes in the body
So for my scenario, in order to work correctly, I added 2 types of extraction rules
One after initial requests, that checks the sub sample URL only with the below settings
Apply To: Sub-samples only
Response Field to Check: URL
Regular Expression: execution=(.+?)$
Another one at the end of each request with execution in the query string, with the below settings
Apply To: Main sample only
Response Field to Check: Body
Regular Expression: execution=([^"]+)"
Then in consecutive requests, replace the execution parameter with the extracted parameter, in my case here I named it ${e3s2}
No comments:
Post a Comment