Sunday, December 16, 2012

jmeter with spring webflow

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

2012-12-16_09-46-29

Request with the “execution” parameter, let’s call them execution requests

2012-12-16_09-46-38

Or it could be request with execution parameter in the query string, and the view state parameter, execution in query requests

2012-12-16_09-52-47

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

2012-12-16_16-20-20

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=(.+?)$

2012-12-16_16-25-04

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=([^"]+)"

2012-12-16_16-30-03

Then in consecutive requests, replace the execution parameter with the extracted parameter, in my case here I named it ${e3s2}

2012-12-16_16-39-15

2012-12-16_16-42-56

No comments:

Post a Comment