Chapter 3. Performance Testing of SOA Applications in Detail

In the previous chapter we learnt about functional testing of web services in detail. In this chapter we will go through the following topics:

  • Performance testing in the SOA world.
  • Performance test planning.
  • SoapUI load generation techniques.
  • Real-time example of performance testing on web services
  • Analysis of performance results
  • SoapUI and LoadUI integration

Performance testing in the SOA world

Performance testing in an SOA application is done a bit differently compared to any other architecture. We don't just need to validate performance requirements of single service components but also test the orchestration, as well as the third-party services.

We can categorize performance testing in the following way:

  • Component level
  • Scenario level
  • System level

Let's go through them in detail.

Component level: When we test the performance of a particular service in isolation it is known as component level performance testing.

Here we test if the response time of the service is within acceptable limits and we also analyze the behavior of the service under different types of performance tests.

This type of performance test is helpful to evaluate the performance of the service in isolation and we get the results early.

We can perform this type of testing easily using SoapUI. We will see this in the coming sections.

Scenario level: When we are done with component level testing and have identified and rectified the performance bottlenecks, the next step is to identify a critical business process to validate.

We aim to verify whether the given business flows, which are achieved via orchestration, are achieved within the acceptable performance measurements.

For example, a new customer order from a retail website will involve multiple service invocations and interaction with multiple databases and third party systems.

Our objective here is to verify the performance of the business tested under varied load conditions.

If the test took more time than expected, a root cause analysis is done to identify any performance bottlenecks like memory leakage, disk usage, and so on.

This type of testing requires a monitoring tool to be set up on the servers which can be used to identify the bottlenecks.

System level: A system level test focuses on putting the load on the architecture of the application and verifying the performance of the architecture under peak load.

To put the load at system level it is advisable to identify the following pre-requisites:

  • Work load model
  • Areas of probable pain
  • Scenarios for work load model
  • User distribution as per the scenario
  • Performance counters to be monitored
  • Monitoring tools to be placed on the servers
  • In case of third-party services, stubs need to be created

Also it should be noted that if the load balancer is in place we should target the load to the load balancer URL.

Once all the prerequisites have been identified and met we are now good to start system level performance testing.

It can be difficult to identify performance bottlenecks in an SOA solution if we have not first done a component level and scenario level performance test.

The analysis phase is the last and most complex phase in system level performance testing as we have multiple performance counters to monitor and analyze.

We should also take into account the third-party services, components, and systems which would be difficult to performance test and analyze. The reason for why it is difficult to analyze the performance of third party systems is because those services are rarely available to us before production, and we can only stub them till then, we should therefore isolate such services and create stubs of those services.

A solution to this issue is to make sure that the third Party services don't become a bottleneck for the system and should be mocked or virtualized effectively. The Third Party vendor can also share his performance results and then a comparison can be made in case of any conflicts by running a test on the virtualized environment and the performance numbers shared by third party vendors.

Apart from this solution, we can request the client or third-party vendor to provide us with a replica of production.

Note

Note: We will study the details of the performance prerequisites in the following chapters.

Let's go through some famous tools in the open source arena for performance testing:

  • SoapUI: SoapUI is an open source tool that can be used for web service testing. In addition to functional testing, SoapUI can also be used for performance testing. One of the advantages of using SoapUI is that you can use it to perform security testing.
  • LoadUI: LoadUI is an open source tool from SmartBear and is used for measuring performance of your SOA applications. It supports almost all protocols except for JMS.
  • Apache JMeter: JMeter is an open source tool that can be used for analyzing and measuring performance and performing REST/SOAP invocations. This tool can be used to automate most user stories. It allows the tester to run the same test with different users and also has the ability to perform parameterization. One of the drawbacks of this tool is that it cannot be used to automate security-related scenarios.
  • cURL: cURL is a command line tool that is used to send or retrieve information with the use of URL syntax. This tool supports many Internet protocols such as HTTP, HTTPS, FTP, IMAP, and many more. cURL is not heavily used for load testing and is mainly used for functional testing.

Now let's go through some of famous Monitoring tools – the following are Open Source:

  • JConsole: JConsole is a graphical monitoring tool that is used to monitor Java Virtual Machine (JVM) and Java applications, both on local and on remote machines.
  • JProfiler: The JProfiler can be used to identify performance bottlenecks, pin down memory leaks, and understand threading issues.

We also have lots of very good commercial tools for performance testing in SOA space:

  • SoapUI Pro or Ready API
  • Load Runner
  • LoadUI pro
  • SOA Parasoft
  • ITKO LISA
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.10.32