load testing with websockets -JMeter? - websocket

From what I have found and tested, you can use the WebSocket Sampler for Apache JMeter, however you cannot record your test requests because the WebSocket request will not be passed appropriately through and back from the Java Proxy Server.
So, what are my options? I can build every request by hand instead of recording - and keep using JMeter -very tedious.
Build a new WebSocket Sampler?
Build onto the Java Proxy Server?
Or use something besides JMeter?
Before I dive into another deep pit, a little good advice would be much appreciated! Thank you so much!

Related

Is it possible to replicate web traffic using blazemeter jmeter using server request logs?

I have a bunch of server logs with api requests I'd like to replicate for testing. Is there an easy way to "export" those logs {uri: $path, query: $queryparams} as input for blazemeter to test?
Jmeter is open source. Just modify the source to replay the logs and to handle the user input and dynamic components. Every time you see a new source IP, fork a new thread. Use the delays between requests to define the think time. And you will have created "Web replay," the equivalent of Oracle's DB Replay
There might be a chance that JMeter's Access Log Sampler will work for you if your server is in: Tomcat, Resin, Weblogic, and SunOne.
If it's not you might need to convert the log to the supported format or implement your own versions of LogParser and Generator
More information: The JMeter Access Log Sampler - A Guide

Loadrunner web_custom_request analog in jmeter

I am pretty new to load testing and whole web thing.
Is there any way to implement things that this Vugen Loadrunner code do
web_custom_request("action",
"{URL}",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer={refURL}",
"Snapshot=t57.inf",
"Mode=HTTP",
"Body={PARAMETER}",
LAST);
In jmeter? The {PARAMETER} is just a String.
JMeter's equivalent would be HTTP Request sampler.
JMeter's Variables have a little bit different syntax so the equivalent configuration would be something like:
If you want to have full control there is also HTTP Raw Request sampler which can be installed using JMeter Plugins Manager
Also be aware that you can record your LoadRunner script using JMeter's HTTP(S) Test Script Recorder, just start JMeter's HTTP(S) Test Script Recorder and in LoadRunner's Runtime Settings set JMeter as the proxy:
When you run your LoadRunner test JMeter will capture the requests and save them under Recording Controller
More information: How to Convert LoadRunner Tests to JMeter
To send any kind of HTTP Request you can use HTTP Request Sampler
To start with use this practical example : build-web-test-plan and then move to advanced build-adv-web-test-plan
Parameterization in JMeter and
Correlation in JMeter
Being a performance tester/engineer/architect brings with it a core ability to recognize patterns associated with success and failure
I am pretty new to load testing and whole web thing.
This is a massive antipattern for success in this field. You need your foundation skills vetted and shored up. You really do need training and a mentor for a period of time.
If your management is asking you to perform in this role, then they should also ensure your path to success. If they are unwilling to fund your training and mentoring period, then I would recommend seeking new management who are more interested in your success and the success of the project.

Non Http Response code: url fail to respond Jmeter

Today i got issue Non Http Response code when run script on Jmeter. My script run over some steps (Login - view) but got this issue and have log that issue at NoHttpResponseException.
I'm using Jmeter version 3.3. And I think that maybe this issue from server side, not by my script.
Does anyone fix this issue before? Please support me to resolve it.
This status code is being returned when an Exception occurs during HTTP Request sampler execution. There are hundreds or thousands of possible exceptions and even more potential causes for them.
If it occurs only under the load - most probably it's a server side error and you need to check the application under test logs and monitoring software results to identify the cause
It might be something described in the Connection Reset since JMeter 2.10 ?
It might be the case your JMeter script is badly designed/implemented and you're sending garbage instead of proper HTTP request
So try to collect as much information as you can:
Application under test and JMeter logs (it includes any middleware such as reverse proxies, load balancers, databases, etc.)
Application under test and JMeter machines health metrics (CPU, RAM, Network, Disk, Swap)
Network layer information, i.e. HTTP Request and response details.
Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.0 (or whatever is the current latest JMeter version available at Downloads page) as soon as it will be possible.

is it possible to use jmeter to test grpc

Was wondering if anybody has tried to use jmeter to test gRPC application.
I was hoping that
I could write a gRPC client class with a non-blocking/asynchronous stub that makes non-blocking calls to the server,
Create a Jar of the above client
Import the Jar to JMeter
Use the Java method in Jmeter BeanShell sampler
before investing time in trying the above I wanted to see if any body has tried something similar and
if above workaround work?
will each thread create a separate TCP connection?
We have tried the load test with python client and locust.io but python gRPC is not gevent compatible and even with async call e.g. stub.GetFeature.future, we are hitting a limit on the request per second per process (async call doesn't seem to be async, GIL bottleneck, once TCP stream)
if above workaround work?
Your solution will work. But if you need it long term, I would recommend, rather than having client class and using BeanShell sampler, implementing custom Java Sampler. It's very practical, since work-wise it will be similar/same as implementing custom client + BeanShell sampler script, but Java sampler is typically more efficient than BeanShell sampler, and maintainability of such solution will be better (you won't have 2 co-dependent components to maintain).
A more fancy option is to create your own JMeter Plug-in (the link I provide here is old, and not very accurate, but it's a good starting point). This is quite an investment, but might be worth it eventually if you find that a simpler solution generally works, but has some major limitations, or you need higher level of configurability and control.
will each thread create a separate TCP connection?
Each thread runs independently, but whether each thread will have its own connection will depend on how you implemented them. In straight forward implementation (where sampler creates and destroys connection), each thread will have a separate TCP connection. But JMeter has properties shared among threads, which, among the rest, can contain objects. So you could share a connection between threads that way. Or you can implement configuration element, which could hold a connection pool, shared by all threads.
Please see grpc-client java project (maven) that creates a gRPC client with JMeter samplers to enable stress testing with JMeter
Build the project with maven and copy the generated jar to JMeter lib/ext folder (e.g. /usr/local/apache-jmeter-3.1/lib/ext/) so that the samplers are in the class path
After that when you launch JMeter, you should be able to see the classes in the "java request" samplers.

Elastic Search Load Testing

I have a single node elastic search server running on ec2. I want to do some load testing using search requests with random search queries. I am using JMeter for load testing with two different approaches -
HTTP Client - When I test using these clients with 10k/20k/50k of requests, it works fine.
ES Transport Client - This works fine with approx 2k of requests.
Here are the steps I have followed -
Instantiating client on every run and close it once the test finished.
Once client instantiates, I start the jmeter sampling and send the search request.
After this run, stops the sampling.
I am getting No Node Available Exception after 2k of request with transport client.
ES Server is running with 3g of memory and have given 6g of memory to load tester.
Please help me if there is some config modification required and if I am not using the correct approach to test the load.
Thanks in Advance.
What kind of responses are you getting from the http test? Have you verified you are getting valid responses for all 10~50k requests? It might be perhaps your cluster cannot take on the load you're putting on it for either test. Since TransportClient is more intimately coupled to the ES server, you will explicitly see errors that come back from TransportClient, but if you're simply sending requests via HTTP without validating the response, it's easy to miss any issues.
Although, before taking a stab in the dark like I just did, I would also check to see what kind of QPS you are getting using the HTTP method vs the TC method, what your CPU/memory look like throughout both tests, what the response times look like, etc. It helps to monitor the health of your system throughout the process to detect any symptoms that might help explain the cause.

Resources