Sunday, 15 July 2012

performance - JMeter, post ALL form data -



performance - JMeter, post ALL form data -

i trying performance test website's edit functionality using jmeter. step trying test posts on 200 items in form. want items same form shown user (excluding 1 intend change). i'm aware possible using regex extractors (see questions jmeter - mvc : form posting model contains dymanic data) need manually set every element in form, vast!

is there way jmeter post form elements without having set each 1 individually? or plugin this?

any help much appreciated.

after defining regular look extractor,

step1) create "debug postprocessor" values= true

jmeter properties = true jmeter variable = true sampler properties = true system properties = true

when inspect post processor, find post parameters values in list. seek find ones appropriate send along post request , utilize api set paramname , paramval shown below.

i used firebug find out required post parameters. know how utilize that, follow link http://community.blazemeter.com/knowledgebase/articles/80479-how-to-use-jmeter-for-login-authentication

step2) create "beanshell pre processor" script. "hiddenlist" reference name of regular look extractor.

log.info("====================="); count = integer.valueof (vars.getobject("hiddenlist_matchnr") ) ; log.info("number of hidden fields in previous sampler: " + count); (i=1; <= count; i++) { paramname = vars.getobject("hiddenlist_"+ + "_g1"); paramval = vars.getobject("hiddenlist_"+ + "_g2"); log.info("adding request parameter: " + paramname + " = " + paramval); sampler.addargument(paramname, paramval); } log.info("=====================");

hope helps.

performance http jmeter performance-testing jmeter-plugins

No comments:

Post a Comment