Re: [Grinder-use] dynamic variables
Distributed load testing framework - Java, Jython, or Clojure scripts.
Brought to you by:
philipa
|
From: Philip A. <ph...@ma...> - 2013-10-08 07:51:12
|
What's the error? - Phil On 07/10/13 15:17, Salma Bouriat wrote: > It didn't work. This is what I tried and I always get an error > > the function: def getCourse(): > course = 'pg0$V$dgCourses$sec2$row11$chkInclude' > return course > > the call: NVPair(getCourse(), 'on'), > > > > On Sun, Oct 6, 2013 at 4:10 PM, Philip Aston <ph...@ma... > <mailto:ph...@ma...>> wrote: > > You can script the parameter however you chose. > > E.g. > > import random > > def calculateColumnValue(): > return "column%d" % random.randint(1, 10) > > #... > request.POST(... > NVPair(calculateColumnValue(), "on") > ...) > > - Phil > > > On 01/10/13 15:07, Salma Bouriat wrote: >> Hey, >> The resulting script I got from the proxy indicated that I should >> use the NVPair function (|*NVPair >> <http://grinder.sourceforge.net/g3/script-javadoc/HTTPClient/NVPair.html#NVPair%28java.lang.String,%20java.lang.String%29>*(java.lang.String name, >> java.lang.String value)| ), but my problem is I need to make the >> first parameter of the NVPair function, which is the name, >> dynamic; for instance, I need the column1 to be dynamic, meaning >> in a scenario, I need to be column2 or whatever >> * NVPair ('column1','on')* >> >> -- >> Salma BOURIAT >> Master of Science in Software Engineering >> Al Akhawayn University >> > |