Thank you. This is working and much simpler than LoadRunner :)
> Date: Fri, 20 Apr 2012 10:55:06 -0700 > Subject: Re: Dynamically changing sampler name during test > From: [email protected] > To: [email protected] > > Hi > i think this works > a. extract out the comment using regex post processor or equivalent > b. Add a BeanShell Post Processor as child of the sampler write code like > prev.setSampleLabel(vars.get("variablenamefromstepa")); => replace the name > with the value you extracted > > An alternative is > If you are processing the results later then you extract the comment to a > variable . you use sample_variables to write this variable to the result > file and you process the result file to deal with this extra value . > > regards > deepak > > On Fri, Apr 20, 2012 at 10:44 AM, Marcelo Jara <[email protected]>wrote: > > > > > Hello! I have a unique (I think) situation here. I'll try to explain it as > > clearly as possible. This may not be doable in Jmeter, but here is the > > requirement: > > > > I have a website and am using the web logs to run performance tests. The > > weblogs will contain all the different URLs that customers would normally > > hit. These can be searches, product pages, home page hits, etc. The URL of > > the request will not tell me what page I'm going to since a user can be > > redirected to other pages depending on the state of the user and system > > (data is always changing). One thing all these pages have in common is a > > comment in the source which describes what page I am at. > > > > Example: http://www.mysite.com/c/this/is/an/example/url can be sent to a > > search results page. So the comment on that page will be "page: > > Search_Results". > > Example: http://www.mysite.com/c/this/is/another/example/url can be > > redirected to the home page because an error may have occurred in some > > backend system. The comment on source will be "page: Home_Page". > > > > > > The problem I'm running into right now is that since I only have one > > sampler which is randomly choosing a URL to hit, the reports will only have > > the sampler name. What I'm looking for is an aggregate report that would > > list the data broken down my the different page types. > > > > > > I'm currently using LoadRunner for this which we're trying to get rid of. > > For those with LoadRunner, I'm achieving this by putting a timer around the > > request, then parsing out the page name, and the using a built-in function > > called lr_set_transaction(name,duration) where I can pass the page name and > > response time. > > > > I hope this makes sense. > > > > > > Thanks, > > > > MJ > >
