rest - gatling load testing Restful Api with @RequestParam -


i writing gatling load test restful api test. endpoint accepts @requestparam, getting 400 when call rest endpoint scala script. here how have setup.

scala script loadtest gatling:    val getmails = exec(http("get_mails")               .get("/api/v1/users/${userid}/mails")               .formparam("datefrom", "1430987200")               .formparam("dateto", "1432987200") 

rest endpoint:

@requestmapping(value="/users/{userid}/mails", method=requestmethod.get, headers="accept=application/json")     public responseentity getmailsb`enter code here`yfilter(@pathvariable("userid") long userid,                                             @requestparam(value="datefrom") long datefrom,                                                         @requestparam(value="dateto") long dateto); 

first, should using queryparam pass "datefrom" , "dateto" in query, not formparam.

then, @requestmapping shows it's triggered if "accept" header "application/json". there's nothing in gatling sample provided proving you're indeed setting header value.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -