Stress testing (software)
   HOME

TheInfoList



OR:

Stress testing is a
software testing Software testing is the act of examining the artifacts and the behavior of the software under test by validation and verification. Software testing can also provide an objective, independent view of the software to allow the business to apprecia ...
activity that determines the robustness of software by testing beyond the limits of normal operation. Stress testing is particularly important for "
mission critical A mission critical factor of a system is any factor (component, equipment, personnel, process, procedure, software, etc.) that is essential to business operation or to an organization. Failure or disruption of mission critical factors will resu ...
" software, but is used for all types of software. Stress tests commonly put a greater emphasis on robustness,
availability In reliability engineering, the term availability has the following meanings: * The degree to which a system, subsystem or equipment is in a specified operable and committable state at the start of a mission, when the mission is called for at a ...
, and
error handling In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
under a heavy load, than on what would be considered correct behavior under normal circumstances.


Field experience

Failures may be related to: *characteristics of non-production like environments, e.g. small test databases *complete lack of load or stress testing


Rationale

Reasons for stress testing include: * The software being tested is "mission critical", that is, failure of the software (such as a
crash Crash or CRASH may refer to: Common meanings * Collision, an impact between two or more objects * Crash (computing), a condition where a program ceases to respond * Cardiac arrest, a medical condition in which the heart stops beating * Couch su ...
) would have disastrous consequences. * The amount of time and resources dedicated to testing is usually not sufficient, with traditional testing methods, to test all of the situations in which the software will be used when it is released. * Even with sufficient time and resources for writing tests, it may not be possible to determine before hand all of the different ways in which the software will be used. This is particularly true for
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s and
middleware Middleware is a type of computer software that provides services to software applications beyond those available from the operating system. It can be described as "software glue". Middleware makes it easier for software developers to implement co ...
, which will eventually be used by software that doesn't even exist at the time of the testing. * Customers may use the software on computers that have significantly fewer computational resources (such as
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered, ...
or
disk space Computer data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processing unit (CPU) of a computer ...
) than the computers used for testing. * Input data integrity cannot be guaranteed. Input data are software wide: it can be data files, streams and memory buffers, as well as arguments and options given to a command line executable or user inputs triggering actions in a GUI application.
Fuzzing In programming and software development, fuzzing or fuzz testing is an automated software testing technique that involves providing invalid, unexpected, or random data as inputs to a computer program. The program is then monitored for exceptions ...
and monkey test methods can be used to find problems due to data corruption or incoherence. * Concurrency is particularly difficult to test with traditional testing methods. Stress testing may be necessary to find
race condition A race condition or race hazard is the condition of an electronics, software, or other system where the system's substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of t ...
s and
deadlock In concurrent computing, deadlock is any situation in which no member of some group of entities can proceed because each waits for another member, including itself, to take action, such as sending a message or, more commonly, releasing a lo ...
s. * Software such as
web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiate ...
s that will be accessible over the
Internet The Internet (or internet) is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a '' network of networks'' that consists of private, pub ...
may be subject to
denial of service In computing, a denial-of-service attack (DoS attack) is a cyber-attack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connect ...
attacks. * Under normal conditions, certain types of bugs, such as
memory leak In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in a way that Computer memory, memory which is no longer needed is not released. A memory leak may also happe ...
s, can be fairly benign and difficult to detect over the short periods of time in which testing is performed. However, these bugs can still be potentially serious. In a sense, stress testing for a relatively short period of time can be seen as simulating normal operation for a longer period of time.


Relationship to branch coverage

''
Branch A branch, sometimes called a ramus in botany, is a woody structural member connected to the central trunk (botany), trunk of a tree (or sometimes a shrub). Large branches are known as boughs and small branches are known as twigs. The term '' ...
coverage'' (a specific type of
code coverage In computer science, test coverage is a percentage measure of the degree to which the source code of a program is executed when a particular test suite is run. A program with high test coverage has more of its source code executed during testing, ...
) is a metric of the number of branches executed under test, where "100% branch coverage" means that every branch in a program has been executed at least once under some test. Branch coverage is one of the most important metrics for software testing; software for which the branch coverage is low is not generally considered to be thoroughly tested. Note that code coverage metrics are a property of the tests for a piece of software, not of the software being tested. Achieving high branch coverage often involves writing ''negative'' test variations, that is, variations where the software is supposed to fail in some way, in addition to the usual ''positive'' test variations, which test intended usage. An example of a negative variation would be calling a
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
with illegal parameters. There is a limit to the branch coverage that can be achieved even with negative variations, however, as some branches may only be used for handling of errors that are beyond the control of the test. For example, a test would normally have no control over memory allocation, so branches that handle an "out of memory" error are difficult to test. Stress testing can achieve higher branch coverage by producing the conditions under which certain error handling branches are followed. The coverage can be further improved by using
fault injection In computer science, fault injection is a testing technique for understanding how computing systems behave when stressed in unusual ways. This can be achieved using physical- or software-based means, or using a hybrid approach. Widely studied phys ...
.


Examples

* A
web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiate ...
may be stress tested using
scripts Script may refer to: Writing systems * Script, a distinctive writing system, based on a repertoire of specific elements or symbols, or that repertoire * Script (styles of handwriting) ** Script typeface, a typeface with characteristics of handw ...
,
bots The British Overseas Territories (BOTs), also known as the United Kingdom Overseas Territories (UKOTs), are fourteen territories with a constitutional and historical link with the United Kingdom. They are the last remnants of the former Bri ...
, and various
denial of service In computing, a denial-of-service attack (DoS attack) is a cyber-attack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connect ...
tools to observe the performance of a web site during peak loads.


Load test vs. stress test

Stress testing usually consists of testing beyond specified limits in order to determine failure points and test failure recovery. Load testing implies a controlled environment moving from low loads to high. Stress testing focuses on more random events, chaos and unpredictability. Using a web application as an example here are ways stress might be introduced: *double the baseline number for concurrent users/HTTP connections *randomly shut down and restart ports on the network switches/routers that connect the servers (via SNMP commands for example) *take the database offline, then restart it *rebuild a RAID array while the system is running *run processes that consume resources (CPU, memory, disk, network) on the Web and database servers * observe how the system reacts to failure and recovers ** Does it save its state? ** Does the application hang and freeze or does it fail gracefully? ** On restart, is it able to recover from the last good state? ** Does the system output meaningful error messages to the user and to the logs? ** Is the security of the system compromised because of unexpected failures?


See also

*
Software testing Software testing is the act of examining the artifacts and the behavior of the software under test by validation and verification. Software testing can also provide an objective, independent view of the software to allow the business to apprecia ...
* This article covers testing software reliability ''under unexpected or rare'' (stressed) workloads. See also the closely related: **
Scalability testing Scalability testing, is the testing of a software application to measure its capability to scale up or scale out in terms of any of its non-functional capability. Performance, scalability and reliability testing are usually grouped together by so ...
**
Load testing Load testing is the process of putting demand on a structure or system and measuring its response. Software load testing The term ''load testing'' is used in different ways in the professional software testing community. ''Load testing'' gene ...
** List of software tools for load testing at Load testing#Load testing tools * Stress test for a general discussion *
Black box testing Black-box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This method of test can be applied virtually to every level of software testing: unit, ...
*
Software performance testing In software quality assurance, performance testing is in general a testing practice performed to determine how a system performs in terms of responsiveness and stability under a particular workload. It can also serve to investigate, measure, valid ...
*
Scenario analysis Scenario planning, scenario thinking, scenario analysis, scenario prediction and the scenario method all describe a strategic planning method that some organizations use to make flexible long-term plans. It is in large part an adaptation and gener ...
*
Simulation A simulation is the imitation of the operation of a real-world process or system over time. Simulations require the use of Conceptual model, models; the model represents the key characteristics or behaviors of the selected system or proc ...
*
White box testing White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of software testing that tests internal structures or workings of an application, as opposed to its functionality ...
*
Technischer Überwachungsverein TÜVs (; short for german: Technischer Überwachungsverein, en, Technical Inspection Association) are internationally active, independent service companies from Germany and Austria that test, inspect and certify technical systems, facilities an ...
(TÜV) - product testing and certification * Concurrency testing using the
CHESS model checker Chess is a board game for two players, called White and Black, each controlling an army of chess pieces in their color, with the objective to checkmate the opponent's king. It is sometimes called international chess or Western chess to disti ...
*
Jinx A jinx (also jynx), in popular superstition and folklore, is a curse or the attribute of attracting bad or negative luck. The word ''"jynx"'' meaning the bird wryneck and sometimes a charm or spell has been in use in English since the seventeent ...
(defunct because of takeover and project cancellation) automated stress testing by automatically exploring unlikely execution scenarios. *
Stress test (hardware) A stress test (sometimes called a torture test) of hardware is a form of deliberately intense and thorough testing used to determine the stability of a given system or entity. It involves testing ''beyond normal operational capacity'', often to a ...


References

{{Reflist Software testing ru:Стресс-тестирование