Re: dynamic variables

Salma Bouriat <[email protected]>
Newsgroups gmane.comp.java.grinder.user
Message-ID <CA++xA=-DUokS_0uYj3-MzVWxsLShnjfXwRLKySv2V2N35B0i1Q@mail.gmail.com>
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 <[email protected]> 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
>
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
> _______________________________________________
> grinder-use mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/grinder-use
>
>


-- 
Salma BOURIAT
Master of Science in Software Engineering
Al Akhawayn University

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk

_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.