Load Testing Desktop Application

How to Perform Desktop Performance Testing

Is desktop performance testing relevant?

I can understand what you are thinking. Performance testing desktop applications is not a good idea, since desktop applications are usually only used by one person.

Performance testing is also limited to app profiling. This involves the analysis of applications using white-box source codes testing and 3rd party profiling tools to find inefficient, large, or non-optimal structures and collections. Individual functions are tested, as well as execution time and associated costs.

Can performance testing be done on a desktop application?

Yes, you can do performance testing on desktop applications. Performance testing desktop applications is just as easy as for mobile and web app performance testing.

This use case is however worth considering. The desktop application acts as a client to a web service. It is possible to load test the backend of an application in such a scenario by simulating the situation where thousands or hundreds of desktop applications access the backend server simultaneously. These types of testing provide answers to the following questions.

  • What is the maximum number of concurrent client applications that can be served, while the response time for each one is reasonable?
  • What are the limits of the current setup? What is the maximum number of client applications that can possibly be served by the current setup?
  • What is the application scale, if any?
  • Is the backend able to recover from a load that is too heavy?

The approach for testing web and mobile apps load testing should be similar.

  1. Take a recording of the test scenario
  2. If necessary, perform correlation or parameterization
  3. To ensure the test is performing as it should, you can run the scenario with at least two virtual users.
  4. You can add virtual users according your load test plan
  5. Test it
  6. Analyze the Results

Can JMeter Test a Desktop Application

You can use JMeter for testing desktop applications.

Continue to step 1, and record the test scenario.

JMeter includes the HTTP(S), Proxy Server that can capture requests between the mobile device or web browser and the backend, and then convert them into HTTP request samplers.

If the desktop application that you are testing uses HTTPS or HTTPS protocols to communicate with the backend server, JMeter should allow you to record and replay the requests with an increased number virtual users.

If you have a well-behaved desktop application that requires network access, it will either use its own settings dialog or respect the proxy configuration of the underlying operating system. This means that JMeter can be used to load test almost any desktop app that communicates over HTTP.

How to Perform Desktop Performance Testing

These are the steps for configuring and troubleshooting desktop performance tests.

Configuration

You will need to use JMeter to track your desktop application’s network activity.

1. JMeter for Recording

JMeter Templates is the fastest and easiest way to prepare JMeter proxy servers. You can access the “recording template” by clicking File->Templates in the JMeter main navigation. JMeter will then populate a suitable structure for recording when you click on the “Createā€¯ button. 8888 is the default port at which JMeter’s proxy server listens. You will need to configure your desktop program to use this port. The hostname is important if JMeter and the desktop application are on the same machine. It could be “localhost” (or “127.0.0.1”) or the IntranetIP address or hostname.

2. Configure your Desktop Application

Configure your application so that the JMeter proxy is used to access the intranet and the Internet. It may be either a separate dialog for proxy configuration or the proxy settings of the operating system.

This is an example of how JMeter’s proxy records requests sent by the Weather application.

Once you have captured the network activity of your desktop application, you can replay it using your load test scenario to see how the backend responds to the load.

Troubleshooting

You might need to take additional steps depending on the protocol used by your desktop application to communicate with the server. These notes are applicable to all Microsoft Windows families:

Proxy Servers

You may have to add a loopback to to route traffic to some applications that are not able to route it to a proxy server.

HTTPS Transport

If your application uses an HTTPS transport, you may need to add JMeter’s self-signed certificate (the ApacheJMeterTemporaryRootCA.crt file which is being generated in JMeter’s “bin” folder when you start JMeter’s proxy) to the Trusted Root Certification Authorities. Open Windows Certificate Manager by selecting the certmgr.msc option from the Run menu.

Network Access

Most desktop applications that require network access use their own proxy settings. You can use the netsh command to create a proxy for Windows Hypertext Transfer Protocol .

You can also avoid most of these steps, if not all, if you use the BlazeMeter Recorder as your personal cloud proxy. You won’t need to install SSL certificates or connect your application to JMeter. BlazeMeter Recorder also allows you to export your tests in Smart mode with automatic correlations applied. This means that you don’t need to spend time trying to detect and handle dynamic parameters. It will do it automatically during the recording.

You can also perform performance testing of your desktop application, even if it doesn’t use HTTP protocol. It is easy to get down to the OSI Transport Level.