I need to test rest api posting Json.
I try to post Json Data by BeanShell PostProcessor using Jmeter.
But BeanShell PostProcessor doesn't work or I couldn't write the right code.
My Json is : {"email":"selin@xxx.com","password":"123"}
You can see in the pictures below what i did.



I think you wanted to make an http request on an api.
Follow this steps.
- Open a new instance of JMeter
- Under Test Plan, add a HTTP Header Manager to set the content type by navigating to Test Plan > Add > Config Element > HTTP Header Manager. Add new value for Name = “Content-Type” and value = “application/json” (without quotes).
- Under Test Plan, add a thread group by navigating to Test Plan > Add > Threads (Users) > Thread Group
- Under Thread Group, add a sampler of type HTTP Request by navigating to Thread Group > Add > Sampler > HTTP Request
- You can add various listeners to the Thread Group. I prefer Results in Table/Tree by navigating to Thread Group > Add > Listener > View Results in Table
You can add JSON data manully like shown on the picture.

There is a gist also
This gist includes BeanShell Post Processor Version