TSM - An overview of Performance Testing on Desktop solutions

Sorin Lungoci - Tester

Application performance can break or make a business given the direct impact on revenue, customer satisfaction or brand reputation. Praised or criticized, performance of business-critical applications falls into the top three issues that impact a business. Currently, the pressure on performance is skyrocketing in a marketplace where demands of application users are getting more varied and complex and definitely, real-time.

I have chosen to talk about performance testing on desktop solutions because the information available in terms of performance is pretty limited but nevertheless critical to success. I am considering for my story not only my experience acquired in different applications, coming from industries like finance or e-learning, but also the wisdom of others expressed as ideas, guidelines, concerns or risk warnings. I hope that my story can make your life somewhat easier and, definitely, more enjoyable when you"re asked to perform such task.

If we speak about the performance of a system, it is important to start from the same definition of what "performance" is. Could it be responsiveness? Resource consumption? Something else?

Performance desktop applications context can have different meanings. I will explain them below.

Architecture

From architecture point of view, there are several types of desktop applications. The layers used are quite the same but the place and interaction between them leads to a different architecture type. Among the most used layers we can recall: UI (User Interface), BL (Business Layer), TL (Transfer Layer) and DB (Database Layer).

Please remember that these don"t cover all combinations between architecture styles and types:

  1. 100% pure desktop - the installed application, having user interface, business layer and database on the same machine without the need of a network connection. As an example, think of Microsoft Money (personal finance management software). This is a single tier application that runs in a single system driven by a single user.
  2. Another Client/Server solution is to have a thin client used a little more than taking the input from the user and display the information, the application being downloaded, installed and run on the server side. It is widely used in Universities or Factories or by staff within an intranet infrastructure. An example can be a student having a CITRIX client installed on a local PC and running an internal application on one of the University servers.
  3. Client/Server application style using Rich Client and Server is the most used solution on a Desktop platform. This type of architecture can be found mostly on intranet computer networks. This is a 2-tier application that runs in two or more systems having a limited number of users. The connection exists until logout and the application is menu-driven. Think of Microsoft Outlook or any other Desktop e-mail program. The program resides on a local PC and it connects momentarily to the mail server to send and receive mail. Of course, Outlook works offline also, but you cannot complete the job without connecting to the server.

Approach

Testing client/server applications requires some additional techniques to handle the effects introduced by the client/server architecture. An example can be: the separation of computations might improve reliability but this can increase the network traffic and also increase the vulnerability to certain types of security attacks.

Testing client/server systems is definitely different - but it"s not the "from another planet" type.

The key to understanding how to test these systems is to understand exactly how and why each type of performance potential problem might arise. With this insight, the testing solution will usually be obvious. We should take a look at how things work and from that, we"ll develop the testing techniques we need.

The testing at the Client side is often perceived more like functional testing. This happens because the application is designed to handle the requests coming from a single user. It isn"t appropriate to load a desktop application with, let"s say 100 users, in order to test the Server response. In case you could do that, you will test the local machine hardware/software (which doubtlessly will be a bottleneck) and not the server or application overall speed. The client performance testing should be done considering the following risks:

The Server part of the client-server system is usually designed to be performance-tested using somehow the same approach as Web testing: record transactions/requests sent to server, and then create multiple virtual-users to repeat those flows/requests. The server must be able to process concurrent requests from different clients.

In various examples of setting up the test environment for Client/Server applications, many teams decided to set multiple workstations (from 2 to 5) as clients, for both functional and performance testing. Each workstation was set to simulate a specific load profile.

Tools

If we compare the tools available to test the performance of a Desktop application compared to the Web, the truth is that there is a misbalance, meaning less tools in the first category. And even fewer tools able to cover multiple platforms like: Desktop, Web or Mobile.

During my investigation on this topic, I have come across some interesting tools described in different articles, forums or presentations.

Due to time constraints, the following tools were not investigated but might help you test the Desktop applications: Microsoft Visual Studio, Borland Silk Performer, Seapine Resource Thief, Quotium Qtest Windows Robot (WR), LoginVSI, TestComplete with AQtime, WCF Load Test, Grinder or Load Runner.

In classic client-server systems, the client part is an application that must be installed and used by a human user. That means that, in most cases, the client application is not expected to execute a lot of concurrent jobs but must respond promptly to the user"s actions for the current task and provide the user with visual information without big delays. The client application performance is usually measured using a profiling tool.

The Profilers combined with Performance Counters even at SQL level could be a powerful method to find out what happens on the local or server side.

You might consider using the built-in profiler of Visual Studio. It allows you to measure how long a method takes and how many times it"s called. For memory profiling, CLR Profiler allows us to see how much memory the application takes, which objects are being created by which methods.

Most UI test tools could be used to record a script that you played back on a few machines.

Collective findings around performance tests

Below, you have the overview of useful findings on desktop application performance as experienced by myself or some other testers:

Risks

The most encountered problems relate to software and the environment. The predominant issue that concerns the performance tester is stability, because there are many situations when the tester has to work with software that is imperfect or unfinished.

I will expose here some of the risks, directly related to Desktop applications performance test:

Conclusions

In summary, some practical conclusions can be drawn and applied in your own work:

Enjoy testing !!