In today's era, No one has the time to wait. Imagine you have to wait for 20 minutes to buy something you have selected online. 90 percent of us would not come back to that website even if the website is offering a little lower price than a website which gets the job done at a much better pace at a few extra bucks. Have you ever been to a website where the web request for payment failed due to non-availability of service? How did you feel? You must be frustrated and cursing for sure. These examples show the impact of performance on business and market reputation. This article discusses the importance of performance testing using realistic Scenarios.

Performance testing software applications can be a tricky thing and requires some deep thinking and planning. Generally as the business grows the current architecture becomes insufficient to manage the growing customers leading to poor customer Service or at times Non-availability of Services which can cause a lot of frustration for consumers and be very harmful to business. Hence, It becomes essential for the stake-holders to plan properly and have a vision for future at the start of the project else poor planning may result in very costly changes to achieve the desired level of performance at later stages. Competition in the market is fierce in the Online World, which makes these Non-Functional aspects such as performance and Usability equally important as the functional part of the application(At times absolutely crucial like for banks and Financial Transactions).

More than often We end up quantify things when it comes to testing the performance of an application as How does the Server respond when 5000 users login the application concurrently or How much requests can the Server handle before there is a deviation in the desired level of performance. Mostly these criteria to test are provided to the testers. Certainly these metrics help us to get an idea how our application might behave in production and help us find some bottlenecks but these are certainly not enough. At times even the business doesn't see the overall picture and just focus on the numbers so it is the responsibility of a good performance tester to create realistic scenarios to simulate a much closer behavior to what might happen in production.

Let me take an example of any e-commerce website. Do we all go to an online store knowing what we want to buy and end up buying the item? The answer must vary from person to person but Most of us go to an online store and see the catalogue and products. One out of 3 times we actually select an item to cart just to check how much the final price of the item be after all the discounts and then go back again looking at some more products. One out of every ten customers end up actually making a payment transaction. Regular Customers generally get logged in(In Case passwords have been saved by the browser) and new customers either sign up or don't log-in the application and just see the products. Keeping all these things in mind we have a much better picture of what kind of load we might expect on our application and help us to easily find bottlenecks in the application.

Performance testing totally depends on the number of requests being generated by each interaction of the user, how frequently that particular interaction is performed and how many Users perform it and how frequently. It also takes consideration how many resources are requested to the server by each request and the web-page that the user has opened generates how many requests. To have a better idea one can pull off stats from production logs and by analyzing the traffic on Server. If the application is not in production yet then methods like Marketing Surveys, the targeted Audience and the Experience helps to design better testing Scenarios.

One of the most important consideration while creating Scenarios is Think Time. It is the time a user takes to analyze something and perform an action accordingly. Now this highly varies from person to person. A lot of factors such as age, impatient User, Slow user, Hyperactive User , Frequent user, New User etc may have different think times. So it is important to take an average which is most suitable and involve this in the Scenarios to make your tests even more fruitful and efficient. Performance Tools Such as Apache Jmeter Provide us the options of various Timers Such as Constant Timer, Random Timers etc to achieve this.

Another key factor while creating performance Scenarios is Anticipation. The idea of flash Sales, Daily Deals , One hour Bizarre Sale and The First Come First Prize Sales are trending.
But Often these kind of Ideas have led to crashing of the Server because of the tremendous User Load which was not anticipated. One wouldn't want their Customers to curse and have a bad User Experience while trying to lure them with their crazy deals. I have seen people using three-four different machines while logged into the same or different accounts to grab these Hot deals. So even if you had a registration concept to control the load , you still need to anticipate that the application supports multiple logins of same Account on multiple devices which would certainly increase the Load. So one needs to think a little out of the box and anticipate things beforehand.

To create better tests and have better coverage and ideal identification of Bottlenecks one should try to create real world Scenarios which ensure Maximum coverage. After Creating the Scenarios one can convert them as different transactions in performance test tools like Apache jmeter and Assign Different User Loads and Ramp up periods. One can measure the performance of these Transactions Separately as well as Collectively.

To Sum it all up, it is highly recommended to follow this approach towards performance testing and Ensure your coverage is better and Serves the Business better. Make Realistic Scenarios, Use think time and anticipate beforehand. I would highly appreciate your views and you can reach me at or connect with me on Skype mfsi_charansethi