Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to send JSON data from csv file in POST method?
    primarykey
    data
    text
    <p>In my project I am using Jmeter for load testing.<br> I have created a test plan as follows:</p> <ol> <li>Login to the application using a csv file which has 10 unique username and password (successfully done)<br/></li> <li>A regular expression extractor will get the session id from the response which will be used in the next sampler for submitting a request. (sessionId extracted successfully)</li> <li><p>The next sampler will submit a request. This sampler accepts two parameters: sessionId &amp; licenseRequest. A little details for the java-script is as follows:</p> <pre><code>url: "groovy/enqueue", type: "POST", global: false, data: {sessionId: uSessionId, licenseRequest: JSON.stringify(requestJSON) }, dataType: "text", </code></pre></li> </ol> <p>For submitting the request I have created a csv file.<br> The csv is similar like this:</p> <p><strong>Entry 1:</strong><br> <code>{"activations":["&lt;activation-code&gt;","&lt;activation-code&gt;"],"email":"&lt;emailIdofUser&gt;","csvEntries":[{"model":"&lt;modelname&gt;","serial":"&lt;serialNo&gt;"}],"comment":"testing jmeter"}</code></p> <p>What I have found out that while submitting the request in th second sampler the post request is malformed:</p> <pre><code>POST data: sessionId=vZNjFjW38cid&amp;licenseRequest=%3CEOF%3E </code></pre> <p>As you can see the licenseRequest's value is not correct. It is sending the EOF, which is not desired.</p> <p><img src="https://i.stack.imgur.com/bNDMq.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload