Response data section is blank in J-meter - jmeter

In case of POST method I am not getting any response under Response Data section, while I did not receive any error in my test plan.
This happens only for Post and Get method and for rest of the others it is working.

Given your Test Plan name is "My First API Test Plan" my expectation is that you need to pass data a little bit differently.
Upgrade JMeter to latest version which is 2.13. It has new functionality, performance improvements, bug fixes, etc.
Remove everything from "Parameters"
Switch to "Body Data" tab
Insert your JSON payload there
Make sure that your HTTP Header Manager is configured to send Content-Type header with the value of application/json
More details and tips in Testing SOAP/REST Web Services Using JMeter guide.

Related

Unable to get security token for Jmeter

I am trying to do some basic performance testing on an app I look after.
I am using Jmeter and done the steps recorder and the same as following Jmeter tutorials on youtube, but I am getting stuck when I need put the variable into the X-CSRF-Token
The issue is I cant find X-CSRF-Token in the captured steps. Is it using some other form of authentication? Any suggestions for me as to other methods would be great.
If the post doesn't make much sense, I don't really have an in-depth knowledge of Jmeter or testing.
To find where the token appeared:
clear browser history
record your scenario using jmeter recording template
then in the view result tree located un HTTP(s) Test Script recorder, use the search field to find the first response in which it appears. You’ll need to add an extractor in the corresponding sampler
you ‘ll then be able to inject it using ${varName}
Depending on your server configuration this X-CSRF-Token can come in:
In the response HTML body
In the response headers, inspect HTTP Header Manager for any hard-coded values
As a HTTP Cookie (which is basically a header as well, however it will be much more convenient to get it from the HTTP Cookie Manager rather than from response headers)
So make sure to inspect all the tabs of the first request in the View Results Tree listener as this X-CSRF-Token guy can hide anywhere.
You can try an alternative way of recording a JMeter test, it can export test in "SmartJMX" mode with automatic detection and correlation of any dynamic parameters including but not limited to CSRF tokens so theoretically it can make your life easier, check out How to Cut Your JMeter Scripting Time by 80% guide for more information and technical details.
If you need further help you will have to provide more details, like full dump of 2 requests along with responses. You can use a sniffer tool like Wireshark or Fiddler to capture it.

"Post" method test result error in JMeter API testing

I tried to run a POST method for API testing in JMeter, I have sent the parameters as needed, but still it shows cannot post.
What should I do to make it work?
user add post request
response message
If you are testing an API my expectation is that you need to send either JSON or XML payload using "Body Data" tab of the HTTP Request sampler.
You will also need HTTP Header Manager to send the relevant Content-Type header
References:
Building a SOAP WebService Test Plan
REST API Testing - How to Do it Right
Another way of building a web service test plan is executing the request(s) according to your test scenario using a 3rd-party tool like Postman or SoapUI and recording them via JMeter's HTTP(S) Test Script Recorder.
In the post request, you need to provide server name or IP address and port number respectively. If it still doesn't work, try changing the path by adding /api then /user/data. it works in some cases.
Hope this works out!

How to POST data in in REST API using J meter

by HTTP request
enter image description herebase url is: http://124.124.21.165:8093/FieldApp/Service.svc/
Your configuration looks good, I would suggest just adding a HTTP Header Manager to send Content-Type header with the value of application/json
Also it would be good to add View Results Tree listener to inspect request and response details (don't forget to remove or disable it when it comes to running the load test assuming large amount of users)
Check out Testing SOAP/REST Web Services Using JMeter test plan for step-by-step instructions

services working fine on rest client but not on Jmeter

I am performing load testing of my web based application.
The service page is working fine on Advance Rest Client application but it is giving 404 page not found error on Jmeter.
Please guide me how to resolve.
404 means your url is probably wrong.
Show your configuration of Test plan for further details.
Add View Results Tree listener to inspect request and response details, HTTP 404 response code usually stands for non-existent URL.
Most likely you'll also have to add HTTP Header Manager to send the relevant Content-Type header as your request might not be properly handled due to missing or incorrect content type.
I would recommend using a sniffer tool like Wireshark to compare what's being send by the "Advance Rest Client" and by JMeter and tweak JMeter test accordingly. If you fail to figure that out by yourself - you can upload captured traffic files somewhere so we could take a look.
See Testing SOAP/REST Web Services Using JMeter guide for baseline JMeter configuration for testing web services.

JMeter not recording an ADF application

I am following the below link to configure JMeter for Oracle's ADF 11g. I am not able to record the ADF Application deployed on WebLogic Server ver 10.3.6 using JMeter 2.10. My JDeveloper version is 11.1.2.4.
http://one-size-doesnt-fit-all.blogspot.com.au/2010/04/configuring-apache-jmeter-specifically.html
The document looks good but I see some weird Test Plan structure. I would suggest to do the following:
Record your use case via JMeter HTTP Proxy server
When you'll get set of "interesting" HTTP requests you'll need to deal with dynamic values as it's described in the guide. The key point is that Regular Expression Extractor is a Post Processor so it must be a child of HTTP Request.
JSESSIONID cookie is handled by HTTP Cookie Manager, there is no need to append it to the URL. Just make sure that you have CookieManager.save.cookies=true property. It can be found in jmeter.properties file under /bin folder of your JMeter installation.
So you need to implement next steps:
Record some HTTP Requests
Extract viewstate and other dynamic stuff from first request via Regular Expression Extractor Post Processor and save it as JMeter Variables
Use variables instead of recorded hard-coded values
You can inspect requests and responses via "View Results Tree" listener, it's able to demonstrate request and response headers, cookies, timings, etc. and response data to assure that you've reached desired page in your flow.
Hope this helps.

Resources