Stress Testing: A Beginner’s Guide in 6 Important Steps

Introduction

User experience is a key aspect of any software and developers are increasingly giving more weightage to the performance of the software or application when in the hands of a user. If an application cannot handle unexpected load or errors, it will crash or deliver a negative user experience sending users scurrying away. To avoid these performance lapses, a method called stress testing is used.

  1. What is Stress Testing?
  2. Purpose of Stress Testing
  3. Types of Stress Testing
  4. How to Perform a Stress Test?
  5. Examples of Stress Testing
  6. Metrics Used in Stress Testing

1. What is Stress Testing?

Stress testing or endurance testing, as itโ€™s also called, is a method of introducing the AUT (Application Under Testing) to extreme conditions and determining whether it can withstand these stresses. Stress testing in software testing measures the stability and reliability of a software, its error handling capacity, and recognizes the limitations of the software, at or beyond which it will crash. It is an essential parameter to identify where the performance of an application stands.

2. Purpose of Stress Testing

A system or software is highly likely to receive high traffic during specific occasions. If the system is unable to cope with unexpected volume of requests during these instances of massive user traffic, it will crash. This leaves users with a negative experience and can be a matter of ill-repute for the brand, as well as cause loss of revenue.

Stress testing puts the system through these scenarios right at the testing stage to see how it fares, allowing time for necessary modifications. Some other important reasons for stress testing are:

  • Performance monitoring during a high traffic and identify causes of failure
  • Test the data saving mechanism before a crash and possible memory leaks or loss or resources
  • Check for any errors or interlock problems in mutually dependent functions
  • Identifying any issues with request priorities
  • Identifying any security issues that may erupt during failures
  • Verifying whether the system prints appropriate error messages during a crash or delivers random exceptions

3. Types of Stress Testing

Testers use different types of stress tests for different scenarios to identify particular issues.ย 

  • Distributed Stress Testing

In a distributed stress test, all the clients linked to a particular server are tested. A stress test is distributed to all the clients and the status of the client system is tracked. If a particular client system cannot communicate with the server during the stress test, debugging is done to resolve the issue. It is possible that one or more client systems in the network cannot communicate with the server when there is stress on the system.

  • ย Application Stress Testing

Critical performance issues, network issues, bottlenecks in data blocking and locking are some of the defects that are tested using application stress testing.

  • Transactional Stress Testing

Transactions that occur between the applications are tested during a transactional stress testing. This testing is use to optimize the application and fine-tune its performance.

  • Systemic Stress Testing

Multiple systems that run on the same server are tested using systemic stress testing. The purpose of the test is to identify any data on one system that blocks the other system.

  • Exploratory Stress Testing

Exploratory stress testing puts forth scenarios that are unlikely to happen and detects how a system would cope under these extreme stresses or conditions. Some of the stresses used could be:

  • Concurrent login into the application by a large number of users
  • Virus scanner setting off simultaneously in all the systems
  • Database shutdown and inability to access it from the front end of the website
  • Input of a large volume of data into the database at one go

4. How to Perform Stress Test?

Stress tests are done in a number of steps. Here is the stress test procedure that is used by testers:

  • Preparing the testing environment

All the software, hardware, tools, and network configurations necessary to perform the stress test are identified and the test environment is prepared.

  • ย Identify the metrics and criteria for performance acceptance

Categorise and identify the metrics that will be used to measure the performance of the system under stress. Set the success criteria for the system in place by recognizing the maximum load for a system to pass or fail the stress test.

  • Planning and designing the test

Create a plan and a design for the stress test and identify test case scenarios.

  • Configuration of the test environment

Set up the test environment with the tools and resources needed for the execution of the plan and make other components available for test.

  • Implement stress test design

Develop and implement a stress test design using the best practices in the industry.

  • Execute the stress tests

Execute the tests and monitor them. Collect and validate the test data and results.

  • Analyse the results

Share the results of the stress test. A stress test for a particular scenario and configuration is accepted to be complete when all the metrics are within acceptable limits, no thresholds have been violated, and all the data has been collected.

5. Examples of Stress Testing

Testers identify several stress test scenarios to determine the robustness of a software and debug any caveats present. Here are some common stress testing examples.

  • Monitoring the behaviour of the system when maximum number of users have concurrently logged in and checking how the system handles multiple logins
  • Checking system response when all the users are performing critical operations simultaneously
  • Identifying any system issues when the same file is being accessed by all the users
  • System response during database server shutdown or a server crash in the server park or other hardware issues

6. Metrics Used in Stress Testing

Performance of an application during a stress test is measured using specific metrics that are identified prior to the stress test. Here are the common ones used:

  1. Average transaction response time: Average time taken by the application to perform transactions per second.
  2. Total transactions per second: Number of transactions that passed, failed, or stopped.
  3. Response time: Total time taken to send and receive a response to the request, under load.
  4. Error rate: Percentage of all the request sent that result in an error.
  5. Hits per second: The number of HTTP requests that were sent by the users to the server per second.

These are only a few of the numerous metrics used during stress testing.

Conclusion

Stress testing is a subdivision under performance testing and forms an essential process while determining the usability and user experience aspect of any particular system, software, or application. Performing stress testing can eliminate these issues before the application is made available to the users and ensure that a negative experience does not occur even during peak user traffic.

A stress test not only tests the performance of the system under stress, but also its ability to revert to its normal stage.

So, have you made up your mind to make a career in Cyber Security? Visit ourย Master Certificate in Cyber Security (Red Team)ย for further help. It is the first program in offensive technologies in India and allows learners to practice in a real-time simulated ecosystem, that will give you an edge in this competitive world.

Also Read

Related Articles

loader
Please wait while your application is being created.
Request Callback