JMeter : 500 Internal server error (calling API) - ajax

Hi Guys does anyone know about 500 internal server error when calling API?
I have an application where one of the functionality gets the data from API
so, i am doing jmeter perfomance tessting on the functionality
1) I recorded scripts using the jmeter proxy (Https recorder)
2) i added the listner
3) ran the script with jus tone thread
I saw 500 Internal server error in Response (please click the below link to see the error screenshot
error screenshot
Is something related to the api server calling using proxy or its problem with my script ?
Please tell any solutions how to do the performance testing on this scenario ?

Your question doesn't have enough information to figure out the cause of the failure so I can only give a piece of general advice:
Capture the request send to the endpoint by the real browser, you can use browser developer tools or external sniffer tool like Wireshark or Fiddler
Do the same for JMeter, either inspect request using View Results Tree listener or the aforementioned sniffer tools
Given requests are the same (apart from dynamic values which need to be correlated or parameterized) you should be getting the same response

Related

Error while trying to send the message over websocket connection in Jmeter | WebSocket Samplers by Peter Doornbosch

I am using a plugin (WebSocket Samplers by Peter Doornbosch) to establish the WebSocket connection in JMeter and trying to send the request message over it but receiving below error in logs
ERROR - eu.luminis.jmeter.wssampler.RequestResponseWebSocketSampler: Unexpected frame type received in sampler 'WebSocket request-response Sampler': Close frame with status code null and close reason 'null'
My test plan consists of "WebSocket Open Connection", "Web-socket request-response sampler" and "web-socket ping/pong frame filter". And I feel there is no issue in establishing the connection but something is wrong while sending the request or receiving a response.
Also, tried checking the logs from the server but didn't find any requests which were sent using JMeter.
Implemented another available plugin too in Jmeter to test the WebSocket but seeing similar behavior. Any help would be highly appreciated.
It looks like you're using the wrong sampler type, looking into the error you're getting it makes more sense to use single-write sampler which is designed for sending one (text or binary) WebSocket frame.
You might want to use a sniffer tool like Fiddler or Wireshark to capture the traffic between your browser (or application) and the backend and see what types of frames are going, which direction, is single connection re-used or each time new one is established, etc.
You may also find the following links useful:
Example scripts collection
JMeter WebSocket Samplers - A Practical Guide
The problem is that your server is actively closing the connection. Usually, this is caused by the client sending a request that the server does not understand. In your case, it's very likely that the request you are sending in the request-response sampler is not accepted by the server. As Dmitri suggests, the best way to find out how a "normal" client communicates with the server is to capture a session with WireShark and model your testplan accordingly.
Hth.

I cannot do load test using jmeter in XMPP server, I had added all plugins and given xmpp connection, samplers for connecting login, and all

I cannot load test the chat application in XMPP server using jmeter, I found all XMPP samplers from connect, login till disconnect as error. Please help!
I get this error in the connect server sampler itself and thereby all samplers are error
Nobody will be able to help without seeing the error details so going forward make sure to include essential information about your test, i.e.
Screenshots of your XMPP Samplers
Output of the View Results Tree listener in screenshot or textual form
Relevant entries from jmeter.log file
In the meantime check out XMPP Load Testing - The Ultimate Guide - it contains comprehensive information on how to configure XMPP Test Elements and simulate different types of events (connect/disconnect, log in, get contacts list, setting status, etc.) as well as example test plans

500 Internal Server Error In Load Testing By Jmeter for SAP application

I am writing load test script for an SAP-based application in jmeter. I am getting 500 internal Server.
I saw that the request looks same which I have on the browser network tab and the one I provided in JMeter. The only difference is in the request header, that I am not providing any SAP-passport in my request. I am not to see the SAP-Passport in the response of any previous request's response so that I can extract that and use in future requests.
Please tell me if I am assuming correctly that the SAP-Passport is the issue, if yes then how can I get that and use in the request. Also if there is a way to get any static SAP-Passport.
Its a blocker for me and its on priority, please help.
As far as I can see from Single Sign-On with SAP Passports article it is a matter of adding a client certificate to JMeter.
Obtain SAP Passport root certificate somehow (i.e. export it from your browser)
Add it to JMeter. This can be done in 2 ways:
Using SSL Manager
Using JMeter system.properties file
Check out How to Set Your JMeter Load Test to Use Client Side Certificates guide for comprehensive instructions on both approaches.

I sent a HTTP request. There is an error in View Results Tree. What wrong am I doing?

I tried many different url but always getting same error. I am new in Jmeter and testing. Java is istalled in am computer.
Your test looks good, just click on the Facebook Home Page in the Listener to see the summary. My expectation is that connection cannot be established i.e. you're sitting behind a corporate firewall
In general,the fastest and the easiest way of getting a JMeter test script "skeleton" is recording using HTTP(S) Test Script Recorder. Check out JMeter Proxy Step by Step guide for instructions.
You can also consider using an alternative solution for recording a JMeter test, it has so called "SmartJMX" mode - automatic correlation of all dynamic parameters. See How to Cut Your JMeter Scripting Time by 80% for details
Now it is working perfect. I could not find why it was not running properly earlier. I did not made any changes.
Check following:
If you are seeing socket connection error thne, If you are behind proxy, launch JMeter with -H server -P Port option (so that JMeter redirects the request.)
Change implementation to Java from httpclient4.

Desktop based application recording in jmeter

I have a desktop based(.exe) application used for trading of equities.
1.Developed in VB uses TCP/IP.
2.Uses a database server which is an another server which the exe sends requests on.
3.I want to get the entire response using jmeter for 50 users at a time.
I wanted to record the responses for the transactions.I have worked with web applications where we create Http proxy server and start it and the recording happenes from browser but in this case i cant use browser.
Please guide me how to record the responses in jmeter with .exe applications.
Thanks and Regards,
Kumar
JMeter HTTP(S) Test Script Recorder is capable of recording only HTTP or HTTPS traffic so if following conditions are met:
Your .exe application talks to server using HTTP
Your .exe application can be configured to use HTTP proxy or respects Windows global HTTP Proxy settings from registry (or configured in Internet Explorer)
the answer is "yes", you can use JMeter to record the traffic. See Load Testing Mobile Apps. But Made Easy. guide for details on how to do it.
If one of above conditions cannot be satisfied there are following options available:
If you still want to use JMeter there is a possibility to use a sniffer tool like Wireshark to capture requests and manually construct them using JMeter HTTP Request or TCP Sampler.
Consider switching to Grinder tool which offers TCP Proxy
Hope this helps.

Resources