JMeter Load testing of API in WSO2 API Gateway - jmeter

In my current project we want to implement high performance test procedures and monitoring in WSO2 and in the API gateway area. Unfortunately there is little or no documentation to help me. Has any of you ever built such a scenario?
I am very grateful for any help!

Load testing of WSO2-hosted webservices isn't different from any other web services, to wit you should be able to use:
Normal JMeter's HTTP Request sampler to execut GET, POST, PUT, DELETE, etc. requests against the API endpoints
HTTP Header Manager to send headers like Content-Type and Authorization
JSON Extractor for extracting dynamic data for correlation purposes
More information:
Load Testing Published APIs with JMeter
API Testing With JMeter and the JSON Extractor

You can refer https://github.com/wso2/performance-apim. In this, it has done some load testing for the API gateway. There it uses slow backends, API mediations, etc. Maybe you can reuse some of the JMeter scripts.

Related

How to conduct performance testing where The service uses meteor js

How to conduct performance testing of my web service? The service displays a page, then the login form in the user's Personal account. It is necessary to enter and display the user's personal account. The service uses meteorjs. To display the personal account is necessary to emulate a browser. jmeter as I understand it is not suitable for this test. He(jmeter) is not able to emulate the browser can't request the js script on the client. Can you recommend tools for such testing? And how conduct ?
Thks
Well-behaved JMeter test can do whatever browser does (from protocol-level perspective). JMeter will not execute client-side JavaScript, neither it will render the response, however if JavaScript generates a HTTP request - JMeter can even record it using HTTP(S) Test Script Recorder (or you can manually create this request by adding relevant HTTP Request sampler)
So the options are:
If your request is ad-hoc (i.e. periodic or on-demand) you can use HTTP Request sampler to mimic it
If your request is asynchronous (AJAX) you can go for one of the techniques described in the How to Load Test AJAX/XHR Enabled Sites With JMeter article or use Parallel Controller plugin
And finally you can use JMeter for kicking off real browser instances using either WebDriver Sampler or JSR223 Sampler

"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!

In Jmeter, how to add sample menu for load test of webservice in version 3.0?

I want to see option to add web service request in Jmeter load test, but I'm not able to find menu option in samples. How can I make this option available in JMeter?
Under Sampler, there is SOAP/XML-RPC Request for SOAP web services.
Under Sampler, you can use HTTP Request for REST services. More info on this is here.
If you do not see them, ensure if you have java 7 at least in the %PATH%. check for any ERROR in the jmeter-log. Easiest option is to do a fresh download jmeter3.0 once again & check.
If you are looking for WebService(SOAP) Request - it has been removed after JMeter version 2.9. Currently it is recommended to use HTTP Request sampler for building web service requests. You may also need HTTP Header Manager to sent Content-Type and SOAPAction headers if required.
You can get a SOAP Web Service test plan "skeleton" in a couple of clicks using JMeter Templates feature, from JMeter main menu choose File -> Templates -> Building a SOAP Web Service Test Plan -> Create
See Testing SOAP/REST Web Services Using JMeter guide for more detailed information on JMeter setup for web services testing.

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.

PostCatcher Equivalent For Https?

I have been using postcatcher.in to test my HTTP post requests. But, I have no been able to find an equivalent service which supports HTTPS. Does anyone knows of something like that?
Beeceptor - can help you. It is real-time and supports HTTPs.
Request payload inspection
Mocking the response when a request path matches
(Disclaimer: I am the author and developed this as a need to proxy requests to an HTTP endpoint and still want to mock a few requests)

Resources