i have problem crawler test (spidering) in jmeter, have native code in java not work because need send parameter in post called javax.faces.viewstate
i need circumvent parameter, leave code in java , based on opinion more feasible crawler (spidering).
enter image description here image error in jmeter
public static void main(string[] args) { try { connection.response loginform = jsoup.connect("http://appware-sst.com/elegancia-ejecutiva") .method(connection.method.post) .useragent("mozilla/5.0 (macintosh; intel mac os x 10_9_2) applewebkit/537.36 (khtml, gecko) chrome/33.0.1750.152 safari/537.36") .execute(); document document = jsoup.connect("http://appware-sst.com/elegancia-ejecutiva/php/inicio_admin.php") .data("user", "admin") .data("password", "12345") .cookies(loginform.cookies()) .post(); system.out.println(document); } catch (exception e) { system.out.println(e); } }
looking regular expression don't think need !
in it.
also depending on server response may in multi lined, having other tag in between name
, value
, etc. recommend getting value using xpath extractor instead, relevant configuration be:
- reference name: meaningful, i.e.
viewstate
- xpath query:
//input[@name='javax.faces.viewstate']/@value
jmeter should fit better supports cookies, headers, cache, reporting. out of box, can use http(s) test script recorder building test skeleton.
you may find how spider site jmeter - tutorial useful can build crawler using html link parser test element only.
Comments
Post a Comment