hi
1. Use CSV Data Set Config. This will let you define variables which
correspond to columns. Every iteration will have the variables take the
values of the next row
2. if simple , you can directly do this in the HTTP sampler
3. Use an HTTPSampler. In the parameter section keep the name field blank.
In value use ${variableName} (Defined in step 1) . So in value you would
have something like
{"attr1":${var1},"attr2":"${var2}",${var3}=["${var4}","${var5}"]} etc etc .
For complex cases you might have to use beanshellregards deepak On Thu, Jul 29, 2010 at 2:54 PM, Sriharsha Setty <[email protected]>wrote: > Hi Deepak, > > On Fri, Jul 30, 2010 at 3:02 AM, Deepak Shetty <[email protected]> wrote: > > > Can be done using the standard HTTPSampler. > > If your objects are complex use something like > http://www.json.org/java/to > > get your objects and String alongwith Beanshell in Jmeter to dynamically > > add > > your values to the sampler otherwise you can manipulate strings yourself > > > > > > I am new to Jmeter and still getting used to it. My JSON snippet is not > very complex. I want to construct key/value pairs (JSON) from a CSV file, > convert it to JSON payload and send it as POST payload. > > I gave a try loading my CSV using the CSV Data Set documented on the > website, but I was unsuccessful. > > Is it possible to do something like this : > > 1. For every POST request, pick up a row from the CSV file > 2. Convert this row to a JSON payload. > 3. Ask Jmeter to use this as POST data. > > That's how I imagine it should be done. Is this wrong? > > Thanks, > /harsha >

