How Performance Testing Helped a Leading Insurer Improve API Response Time by 70% ( Part 2)

This article is a continuation to our blog post, Performance Testing – The Sustainability Mantra of the Mobility World! (Part 1). It delves deeper on the essential nature of Performance Testing by providing a real world example where Performance Testing is implemented to optimize the application performance for better efficiency.

The Challenges Faced Prior to the Implementation of Performance Testing

The client’s focus was on the extensive performance of a web application, which enables them to handle thousands of insurance applications per day without causing any delay. After meticulous investigations, it was analyzed that the area for performance improvement was the current Web Service/ API layer which was used in the application in the development phase. It was observed that few of the APIs were not meeting the expectations. It was a challenging task to find bottlenecks in the system quickly and resolve them so that the system can be migrated to a superior version of infrastructure and the Web Service/ APIs can be optimized.

Tactical Approach and Careful Strategizing for Effective Testing

After conducting a thorough research, a solution was arrived at to manage the performance issues. The selection of right tool was done to determine the current performance of the application that provides flexibility to simulate the number of users and requests. From finding the best-fit technology to implementing it within stringent timelines, it was decided to find the performance bottlenecks through the following phases:

  • Requirement Phase – Test activities which includes scope of testing, test goals & objectives, test entry & exit criteria.
  • Planning Phase – Preparing test plan & strategies, choosing testing & monitoring tools, test scripts & design of scenarios, setting up test bed as per the requirements.
  • Execution Phase – Setting up the test data required for execution, performance test scenario execution, analyzing the test results, identification of bottlenecks, generate performance analysis report with all the performance attributes of the application.
  • Completion Phase – Final performance test report generation, post implementation review, project completion checklist.

The Unique Process and Technique for Performance Optimization

The key business processes, requirements, infrastructure were identified and understood which helped to configure a performance testing environment that accurately simulates a production environment. The test data was identified and also created as it was needed to perform the request in bulk on APIs. The required environment was created that was similar to the production environment of the client. User actions were recorded with Jmeter for capturing the APIs in order to regenerate the real-time scenario.

Customizing the test plan is a major step that has been used to check how the application performs the same operations with multiple sets of data. The next major step was the correlation – dynamic values had been captured and passed from the server to the client and back. In this stage, the script is modified so that some of the hardcoded values in the script are no longer hardcoded, which helps the Jmeter by sending the different values to the server. This will conclude the general preparation of a web test plan and customization of the APIs.

Test monitoring is one of the crucial parts in which you have to manage and monitor all the statistics that further defines end-test results. The test statistics were built that gave a clear picture of how the application and server would behave with different load conditions. You get the current status of your application and how the application and server are responding to requests.

Preparing the Test Execution Flow Model

Execution of the Performance Test Effectively for Optimum Productivity

The core user flow of the application was simulated to validate the end-to-end performance. Though manual intervention is required to collect the data points at various tiers, New Relic is used to provide a glance look at the load status of the application and how it is responding to improvements in performance tuning. From the observation, it is found that some of the particular APIs were not performing as expected. They had low response time as compared to the other APIs that could affect the productivity of the business adversely.

The first testing process was initiated on a given server and test environment setup that supported the required amount of users. In a single hit of the API it was taking around 1000 milliseconds for an operation but in case of concurrent hits, the response was about 2000 milliseconds which helped to determine the benchmark for the performance tuning. The final report was handed over to the development team for decoding the performance issues.

Benefits Achieved 

The team of engineering professionals understood the core elements and assured that the system’s performance meets or exceeds expectations. The performance test report helped to understand the issue and determine the acceptable success criteria. Ranging from the application to the database server, the team found several areas for improvement.

  • The server was scaled up which optimized its performance levels for better efficiency.
  • The team re-configured the web server to handle the specific load in the API to perform better.
  • After implementing the proposed solution, the response time of the API was improved more than 70%, enabling the client to handle more business at a time.
  • The improvement in performance of the system saved time, effort and facilitated the user experience.
  • This approach to performance testing helped the client to resolve the product scalability issues and improved the overall performance of the product.

Provision of a detailed performance reporting mechanism, domain expertise and understanding of the system enable the customers to prioritize their releases for the assurance of greater productivity of their business solutions. Performance testing is implemented to provide the stakeholders with information about their application regarding speed, stability, and scalability. It is crucial to make your applications faster, more stable, and more scalable. Hence, performance testing plays a pivotal role as it tells the developers how fast, stable, and scalable their software is so that the client can decide whether it needs improvement or not.