I am using jmeter for tesing a website. My question is that is jmeter dependant on the internet connection? What if there is no internet connection? Will jmeter be able to send requests?
If you are running Jmeter locally, yes -- the overall load capacity of your test is entirely dependent on your Last Mile connection. But if you don't want to fork out the $$$ for your own OC-3, you can look to hosted Jmeter solutions providers -- basically Jmeter as a Service.
JMeter just captures the web requests and mimics the behavior, helping you automate the requests. As you are simulating web requests, you need connectivity to your web application. If you have your website hosted locally in that case you don't need internet connection, but you will surely need a way to reach the website wiz. LAN.
Again the results will vary based on the network bandwith, latency etc. If there is no internet connection and if your browser is not able to make request to your site, then JMeter will also not be able to reach the site and won't be able to make request.
Related
We are trying to load test our login workflow, by simulating 50+ users logging into our front-end, via the API calls. As part of the login process, we make a websocket connection to a SignalR hub(Connect). We then send a call over the websocket connection to a custom endpoint in SignalR(Login), used to add some data to the Redis cache, then do some stuff which isn't important, then send a call to a different custom endpoint over the websocket connection(Logoff) and then Disconnect the websocket connection.
So my question is multi-part:
How do we create a websocket connection from within JMeter?
How do we make a call to a custom endpoint over the websocket connection in JMeter
How do we do this for multi users simulated to be running in parallel, so we can test the load? In other words, we need multiple websocket connections open / alive from JMeter so we can test the load.
Note: Please be aware, I'm asking this on behalf of the load tester/JMeter developer, but because they are new to Stack Overflow, and I understand the SignalR side, I've been asked to log it. I know zip about JMeter, so please handle me like a noob trying to help someone solve a frustrating but important problem.
JMeter per se doesn't support WebSockets, you will need a special plugin if you want to enable this functionality.
The most advanced, comprehensive and supported as of now is JMeter WebSocket Samplers by Peter Doornbosch, it can be installed using JMeter Plugins Manager
Once you install the plugin and restart JMeter you will see several new samplers which will allow to open connection, send request, read response, and close connection.
Unfortunately I cannot guide you further because I don't know the specifics of your application, just look into your browser developer tools or other sniffer tool and configure JMeter to send the same requests as your browser (or other application) does.
More information:
Test SignalR Performance with JMeter
JMeter WebSocket Samplers - A Practical Guide
samples directory contains several example test plans covering different scenarios
I have a client/server configuration.
In the client I have an application that talks to the server by http/https withou a browser being used.
I want to know how to configure client and jmeter to record the http requests being send from client to server
The client is a Windows 10 machine.
There can be several options:
Your application has dedicated proxy configuration. In this case just configure it to use JMeter as a proxy
Your application respects OS-level proxy settings. For Windows 10 hit "Win + S" and type "proxy". Perform proxy configuration at all available locations:
If everything goes well you should be able to record your application network activity using JMeter. Refer to How to Run Performance Tests of Desktop Applications Using JMeter for a little bit more detailed information and some troubleshooting steps.
Could some one please help me on the below
Is it possible to record desktop applications using JMeter?
I just tried the following, but didn't work
File--->Template--->Create
Workbench--->Recording Script-->Start
Launched my application which is desktop and perform some actions
Workbench--->Recording Script-->Stop
When I expand Threadgroup--->Recording Controller-Nothing recorded
Where am I missing?
You miss one important step:
configure your desktop application to use proxy and provide host and port where JMeter is running (localhost and 8888 if they live on the same machine
Also be aware that:
JMeter can record only HTTP or HTTPS traffic, if your application uses other protocol - the calls will not be recorded. In that case you can consider The Grinder as an alternative, it comes with TCPProxy which is more low level therefore is cable to capture more protocols
If your application uses HTTPS protocol you will need an SSL certificate in order to decrypt and record the requests, you can configure your application to use JMeter's certificate or vice versa.
On MS Windows you may need to add a Loopback Adapter
See How to Run Performance Tests of Desktop Applications Using JMeter article for more details on simulating multiple desktop applications using JMeter
As help explains:
The recorder is implemented as an HTTP(S) proxy server. You need to set up your browser use the proxy for all HTTP and HTTPS requests.
Technically browser is also a desktop application, so to answer your first question, yes, you can record desktop applications using JMeter. However, just like browser, your desktop application must have an ability to connect to the internet via user-defined proxy. And also recorder will only record HTTP traffic from and to the application, it will not record client-only UI events, or traffic generated by any other protocols.
So to sum up:
Any desktop application can use JMeter recorder
But only if you can configure it to use JMeter recorder as a proxy
And only if your goal is to record HTTP traffic related to your desktop application, nothing else.
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.
The Performance Golden Rule from Yahoo's performance best practices is:
80-90% of the end-user response time
is spent downloading all the
components in the page: images,
stylesheets, scripts, Flash, etc.
This means that when I'm developing on my local webserver it's hard to get an accurate idea of what the end user will experience.
How can I simulate latency so that I can understand how my application will perform when I've deployed it on the web?
I develop primarily on Windows, but I would be interested in solutions for other platforms as well.
A laser modem pointed at the mirrors on the moon should give latency that's out of this world.
Fiddler2 can do this very easily. Plus, it does so much more that is useful when doing development.
YSlow might help you out. YSlow analyzes web pages based on Yahoo!'s rules.
Firefox Throttle. This can throttle speed (Windows only).
These are plugins for Firefox.
You can just set up a proxy outside that will tunnel traffic from your web server to it and then back to local browser. It would be quite realistic (of course it depends where you put the proxy).
Otherwise you can find many ways to implement it in software..
Run the web server on a nearby Linux box and configure NetEm to add latency to packets leaving the appropriate interface.
If your web server cannot run under Linux, configure the Linux box as a router between your test client machine and your web server, then use NetEm anyway
While there are many ways to simulate latency, including some very good hardware solutions, one of the easiest for me is to run a TCP proxy in a remote location. The proxy listens and then directs the traffic back to my final destination. On a remote server, I run a unix program called balance. I then point this back to my local server.
If you need to simulate for a just a single server request, a simple way is to simply make the server sleep() for a second before returning.