Couldn't load Cookies file generated from firebug into Apache jMeter Cookie management? -


i testing website requiring cookies data set properly, , there quite lot cookies data making annoying add manually. google little , know might export cookies out of firefox firebug , load in jmeter http cookies manager. try many times , fail see cookie data imported, there nothing changed, don't know what's going on.

i using latest jmeter. suggestions?

these of cookie data, exported out of firebug

.qq.com true    /   false   1755394742  rk  xgvq1yp4tf .tenpay.com true    /   false   certallnum  1 .tenpay.com true    /   false   certinfo    1|150537011- .tenpay.com true    /   false   certlist    150537011- .tenpay.com true    /   false   certuserflag    1 .tenpay.com true    /   false   1441074265  ctrlserverr undefined .qq.com true    /   false   1443526587  lskey   0001000064e173918a7f1bfc52dc25d64a62e88892dfc1128b742e69cdf304aecaf2136b14628f2188588a3a .qq.com true    /   false   1443526587  luin    o0414077270 .qq.com true    /   false   2147385600  o_cookie    414077270 

and how tried load cookie data: enter image description here

jmeter's http cookie manager smart enough handle cookies on own.

looking response tenpay.com website can see following:

<!doctype html> <html> <head>     <meta charset="gb2312">     <meta http-equiv="refresh" content="0;url=https://www.tenpay.com/v2/">     <title>²Æ¸¶Í¨ - »áÖ§¸¶ »áÉú»î</title> </head> <body> </body> </html> 

pay attention line:

<meta http-equiv="refresh" content="0;url=https://www.tenpay.com/v2/"> 

as per user manual

jmeter not browser. far web-services , remote services concerned, jmeter looks browser (or rather, multiple browsers); jmeter not perform actions supported browsers. in particular, jmeter not execute javascript found in html pages. nor render html pages browser (it's possible view response html etc., timings not included in samples, , 1 sample in 1 thread ever viewed @ time).

it means jmeter won't open https://www.tenpay.com/v2/ url automatically, you'll need explicitly "tell" jmeter execute request url.

  1. extract url <meta http-equiv="refresh"... bit regular expression extractor like:

    • add regular expression extractor child of first request
    • configure follows:

      • reference name: meaningful, i.e. url
      • regular expression: <meta http-equiv="refresh" content="0;url=(.+?)">
      • template: $1$
  2. add new http request sampler after 1st sampler, leave intact , put ${url} in "path" input test plan like:

    test plan example


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -