1

I followed the instructions from this Stack Overflow page:

  1. Record create user scenario using JMeter.
  2. Parametrize add user request (username, details) with CSV data set config element.
  3. Add CSV data set config with required no. of entries (500 in your case) where each line represents user details, user1, India, passwd1, user2, US, passwd2.
  4. Add View result tree.

When I run this scenario, it displays this error and I don't know why:

Response code: 500

Can any experts out there share what I am doing wrong here?

5
  • have u passed username and password in http request? Sep 14, 2017 at 9:24
  • yes, when I create thread 1 user and input data directly: it passed. But when I use CSV the result is fail
    – Sonora
    Sep 14, 2017 at 9:31
  • you have to identify dynamic elelemnt in each http request, then extract each responce from json path extractor , save that var in dynamic variable in jmeter varieble and pass in next request...now post your output snap Sep 14, 2017 at 9:36
  • HTTP status 500 is an internal error on the server w3.org/Protocols/HTTP/HTRESP.html Sep 14, 2017 at 9:39
  • @sameerjoshi: I cannot post pic here. How can I send it for you :(
    – Sonora
    Sep 14, 2017 at 9:47

2 Answers 2

1

HTTP Status Code 500 stands for Internal Server Error so first thing you should do when you see it is checking your application log files, most probably you will find the cause of the problem there.

Also be aware that record and replay won't work in 100% of times, modern web applications widely use dynamic request parameters and headers mostly for client state management and security reasons so you will need to take them into consideration as well so your test plan would look like:

The process is known as correlation and you should be able to find a lot of information over the web on it. Given JMeter will send the same requests as the real browser - you should be receiving the same responses.

Also add a HTTP Cookie Manager to your Test Plan, it automatically detects and handles Cookies and deals with cookie-based authentication

1

JMeter is a Load testing tool and not a data creation tool.

  • It should be used for load testing and not functional aspects. Though it can be used for data creation because of its record and replay feature. (of course with parametrization)

To create data,

  1. You need to record create user scenario using JMeter.
  2. Parametrize add user request (username,details)with csv data set config element.
  3. Add CSV data set config with required no. of entries (500 in your case) where each line represents user details, user1,India,passwd1 user2,US,passwd2.
  4. Run script with 500 threads (not advisable but a possible way) or single thread with 500 loop count. This will create users with data from csv. After that you can load test your website.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.