Can jmeter be used to load test native desktop applications? - jmeter

We have a wintop application written in Java mainly. Can we use Apache jmeter to do load testing of 300 users for desktop application?

If you use command line Parameters, maybe, but it is not made for Testing of GUI Applications. For that, you Need robots like assertj-swing, or what you used for programming.

How do you imagine 300 users of a desktop applications? A desktop application is normally being used by 1 user only therefore you rather need to user profiling tools (i.e. JProfiler or YourKit) in order to detect slowest components and perform all the necessary optimisations.
You can use JMeter only in the case when your desktop application relies on backend server(s), in this case you might want to check whether the backend is capable of supporting 300 concurrent desktop applications. Also be aware that you need to assess the network protocol(s) your application uses - JMeter has to support it in order to be used for testing. If you're lucky enough and your application uses HTTP (or HTTPS) protocol - you will even be able to record it using JMeter's HTTP(S) Test Script Recorder, check out How to Run Performance Tests of Desktop Applications Using JMeter article for more details.

Related

Trying to Performance test an application developed in OJET technology. Which tool/protocol should I use for scripting?

Trying to Performance test an application developed in OJET technology. Which tool/protocol should I use for scripting? I tried HTTP/Web protocol with Jmeter and Load Runner. But that doesn't capture all the requests and responses at the javascript/browser level. Hence I am facing issues in correlating the dynamic values during test design. Hence, scripts fail during the replay. Currently trying to do it with Truclient Web protocol as an alternative. But I need to know which tool/protocol should I use for scripting?
According to OJET looks like this is a web app generator.
If you choose to start with JMeter use post-processor such as regex to catch and save every value that is needed for as arg in the next request.
Don't be afraid of these dynamic values. Try to follow next articles to get the idea.
None of tools will provide you automatic correlation without issue. Nor LoadRunner, nor Jmeter. It is always tricky.
Ask more specific questions when you start facing issue.
Jmeter catch correlations
You need to implement real user using your application with 100% accuracy in terms of network footprint
Both JMeter and/or LoadRunner are not capable of executing client-side JavaScript, the options are in:
Implement these JavaScript-driven network calls using scripting (in JMeter it will be JSR223 Test Elements)
Use a real browser, LoadRunner's Truclient protocol is basically a headless web browser, in JMeter can be integrated with Selenium browser automation framework via WebDriver Sampler
With regards to "which protocol/tool" to use:
Implementing JavaScript calls manually will take extra effort, however your test will consume less resources (CPU, RAM, etc.)
Using real browsers will take less efforts, but the test will consume much more resources (something like 1 CPU core and 2 GB of RAM per user/ browser instance) and you won't have metrics like Connect Time, Latency, etc.
LoadRunner TruClient. This will handle all of the Javascript executions and dynamic elements related to session, state, date/time, object identifiers, ... You will still need to appropriately handle user input items.

Can i test native ios app with Jmeter using Simulator

Can i test native ios app with Jmeter using Simulator? Also, my app requires login.
If not what is the best tool i can use for that?
If you want to measure your application performance JMeter won't help you, it's a load testing tool which acts on a network protocol level.
So if you want to collect application-side performance metrics and detect slow parts of your application it's better to use Instruments (comes with Xcode), see i.e. How to find and fix slow code using Instruments article for more details.
JMeter can help you to simulate hundreds or thousands of iOS application users concurrently accessing the backend or database, but this is the test against the backend, not against the application. If this is something you're interested in you could record your mobile application traffic using JMeter's HTTP(S) Test Script Recorder and once done replay it with increased number of virtual users to see how your backend handles the load. Check out Load Testing Mobile Apps Made Easy article for the overall concept.

Should I use JMeter or Selenium for load and performance testing of Web applications?

In your opinion which will be better the record or the creation of the scripts by Exemple with selenium and junit?
Does the record method allow test visibility and maintainability of the code?
JMeter(Open Source)/LoadRunner(Licensed) are the most popular tools for performance testing(Load testing). Selenium is not the right choice for this job, it is the automation tool for web applications.
If you want to start in performance testing, I would suggest you to use JMeter for this job.
It is not a good way to use selenium for load testing, But Jmeter's main purpose is to do performance testing on web applications. So Jmeter is the right tool to to do performance related testing.
Selenium is a browser automation framework, it means 1 virtual user will kick off a real browser instance and modern web browsers are very CPU and memory intensive, for example Firefox 72.0.2 requires 1 CPU core and 2 GB or RAM per browser instance.
JMeter in its turn operates on HTTP protocol level which has much less footprint.
So if you need to simulate large number of users - it's better to consider JMeter.
If you're doing client-side performance testing (measure JavaScript execution time, page rendering speed, etc.) - go for Selenium.
If you need both - create main load with JMeter and use 1-2 virtual users running Selenium
Check out How to Convert Selenium Scripts into the JMX Converter article to learn how Selenium tests can be transformed into JMeter using Proxy2JMX service of the Taurus tool

100k HTTP Requests simultaneously

I have to test my rest API such that 100k API calls are made simultaneously(within 500ms).Any Idea how to simulate it?Utility to use?
I would suggest to use JMeter too, it enable your test to create multiple concurrent jmeter server. Just to be clear you can control multiple remote JMeter engines from a single JMeter client and replicate a test across many computers and thus simulate a larger load on the target server.
To be honest, your target is quite high (100k API calls simultaneously within 500ms), i.e. you'll need a lot of jmeter servers. When you create stress tests, there are not magical recipes, guides or manuals. Trial and error is a fundamental method of solving this kind of problems.
In my experience, I first try with few concurrent users and see how the server react. Then increase the number of concurrent users till to reach an intolerable performance decrease or, worst, a bottleneck .
http://jmeter.apache.org/usermanual/remote-test.html
You will obviously need a load testing tool which can be run in a distributed mode, i.e. 1 controller and X load generators executing the same test.
Grinder - scripts are written in some Python dialect
Apache JMeter - this guy doesn't require any specific knowledge, you can create tests using simple GUI
Tsung - is written in Erlang, known for capability to produce high loads even on low-end hardware.
See Open Source Load Testing Tools: Which One Should You Use? article for more information on above tools.
JMeter
The Apache JMeter™ application is open source software, a 100% pure
Java application designed to load test functional behavior and measure
performance. It was originally designed for testing Web Applications
but has since expanded to other test functions.

Performance testing of Thick client

I have a thick client application to be tested. We need to downlod the jnlp file and then launch it, supply required credentials and click submit. It then launches the application.
I'm newbie to performance testing and want to performance test this application. Which open source tool will be useful, which is the best tool for testing thick clients?
What do you mean by "Performance testing of Thick client"? If it is about how fast it launches, downloads or operates than you need to loop into desktop automation software. The best open source tools currently available for desktop testing automation are:
Sikuli
LDTP
If your application does network communication and your scenario assumes simulating hundreds or thousands of simultaneous thick clients communicating with the server using the following open-source tools can help:
Grinder
Gatling
JMeter
Tsung
If your application supports proxy (given .jnlp - it is Java-based application and it surely does) and the protocol is HTTP(S) you will be able to record test scenario and replay. The Grinder tool recording proxy can go a lower level and perform TCP protocol recording.
For more information on main features comparison for performance testing tools listed above look into Open Source Load Testing Tools: Which One Should You Use? post.
If your application uses a form of secure communication or proprietary protocol you should be able to replicate it's behavior by plugging your application libraries to JMeter, Grinder or Gatling and use their multithreading and reporting features to perform massive load testing.

Resources