Re: generated script mishandles multi-valued request parameters
Philip Aston <[email protected]> Thu, 05 Apr 2012 05:09:48 +0100
| Newsgroups | gmane.comp.java.grinder.devel |
|---|---|
| Message-ID | <[email protected]> |
I think the Jython script will do this too. Please open a ticket. - Phil On 04/04/12 04:22, Bill Smith wrote: > My app has a form post with a multi-valued parameter The generated > Clojure script erroneously uses the same value for all instances of > the parameter. See for example the references to *token_login2* in > the script fragment below: > > ; Worker thread state is stored in a map using a dynamic var. > (def ^:dynamic *tokens*) > (defn set-token [k v] (set! *tokens* (assoc *tokens* k v))) > (defn token [k] (*tokens* k)) > > [...] > > (defpage page4 "POST login (requests 401-408)." (Test. 400 "Page > 4") [] > (set-token :token_login2 "Login") > (set-token :token_login2 "") > (set-token :token__sourcePage > "HQduFOCJZk6Fw7gPHLMv3_9ey7vdLQ8IuRf--7h2p03EenTfDNNtuw==") > (set-token :token___fp "RbQxcD5ZA1A=") > > ; Expecting 302 'Found' > (.POST request401 "/t/a/login" > (nvpairs [ > "__session_id__" (token :token___session_id__) > "operator.password", "XXXXXXXX" > "login2" (token :token_login2) > "targetURL" (token :token_targetURL) > "operator.username" (token :token_operatorusername) > "login2" (token :token_login2) > "_sourcePage" (token :token__sourcePage) > "__fp" (token :token___fp)]) > (nvpairs [ > "Content-Type", "application/x-www-form-urlencoded"])) > > (.sleep grinder 12) > > > In the above example, the body of the form post should contain two > values for "login2": the string "Login" and the empty string "". > Instead, both instances will be the empty string. > > Observed using the Grinder 3.9 snapshot, Sun Java 1.6.0_26, and > Firefox 11. > > Bill Smith > ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Grinder-development mailing list Grinder-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/grinder-development