So now that you have a working and functional REST service, it's time to figure out how it will hold up in various real-world scenarios. How many users does the service need to support? Is the number of users constant or does it fluctuate throughout the day? What is the expected traffic like? Are there periods where there is a sudden surge in traffic and then suddenly drops down? These are some of the questions you'll need to think about and decide whether which ones are applicable to your REST service.
Once you've established the performance requirements of the service, you can then setup the test parameters in FINT. Listed below are some test scenarios that you could consider running
Standard Load Test Scenario
This will serve as the baseline, the reference setup, at which the service will perform without any errors. In this test scenario you configure the minimum number of clients that the service will support as well as the frequency with which the clients will call the service. At these settings, the service is expected to function without any failures.
Peak Load Scenario
In this scenario you configure the test in such a way that the load i.e. the number of clients, on the REST service gradually increases over a period of time until it reaches the maximum expected number of users. This scenario is more reflective of real life behavior, most especially if the service is being used by actual human users.
Say for example you built a secure Chat Service for internal use. Early in the day, the number of chat clients are low. However, as the day progresses more and more people start coming in to work and logs in to the chat service. At some point in the day, everyone is in and the service is handling the maximum number of users for that day.
Saturation Test Scenario
In this test scenario, you configure the test in such a way that the load is constant over a very long period of time. Ideally, you will setup the "Peak" load (the expected maximum number of clients) and run it for several hours. This test scenario ensures that the REST service stays up and can reliably function over periods of sustained heavy load.
Stress Test Scenario
In this test scenario, you configure the test in such a way that the service is "stressed" to the point of failure (or to the point of it performing outside the defined performance requirement)
Handling of Bursts
The first 3 scenarios above (Standard, Peak and Saturation) assumes that the load on the service is either constant or is gradually building up. In reality however, services will need to handle sudden bursts of activity to ensure that the service does not go down and performs within the defined limits.
Finding the maximum number of users
This scenario is similar to the Peak Load Scenario above, with one difference. The target number of clients/users continuously grows throughout the duration of the test. The goal here is to find maximum number of clients that the service can support before it starts to fail or degrade in performance.