In my project I am using Jmeter for load testing.
I have created a test plan as follows:
- Login to the application using a csv file which has 10 unique username and password (successfully done)
- 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)
The next sampler will submit a request. This sampler accepts two parameters: sessionId & licenseRequest. A little details for the java-script is as follows:
url: "groovy/enqueue", type: "POST", global: false, data: {sessionId: uSessionId, licenseRequest: JSON.stringify(requestJSON) }, dataType: "text",
For submitting the request I have created a csv file.
The csv is similar like this:
Entry 1:{"activations":["<activation-code>","<activation-code>"],"email":"<emailIdofUser>","csvEntries":[{"model":"<modelname>","serial":"<serialNo>"}],"comment":"testing jmeter"}
What I have found out that while submitting the request in th second sampler the post request is malformed:
POST data:
sessionId=vZNjFjW38cid&licenseRequest=%3CEOF%3E
As you can see the licenseRequest's value is not correct. It is sending the EOF, which is not desired.