Software performance testing
   HOME

TheInfoList



OR:

In
software quality assurance Software quality assurance (SQA) is a means and practice of monitoring all software engineering processes, methods, and work products to ensure compliance against defined standards. It may include ensuring conformance to standards or models, suc ...
, performance testing is in general a
testing An examination (exam or evaluation) or test is an educational assessment intended to measure a test-taker's knowledge, skill, aptitude, physical fitness, or classification in many other topics (e.g., beliefs). A test may be administered verba ...
practice performed to determine how a
system A system is a group of interacting or interrelated elements that act according to a set of rules to form a unified whole. A system, surrounded and influenced by its environment, is described by its boundaries, structure and purpose and express ...
performs in terms of responsiveness and stability under a particular workload. It can also serve to investigate, measure, validate or verify other
quality Quality may refer to: Concepts *Quality (business), the ''non-inferiority'' or ''superiority'' of something *Quality (philosophy), an attribute or a property *Quality (physics), in response theory * Energy quality, used in various science discipl ...
attributes Attribute may refer to: * Attribute (philosophy), an extrinsic property of an object * Attribute (research), a characteristic of an object * Grammatical modifier, in natural languages * Attribute (computing), a specification that defines a prope ...
of the system, such as
scalability Scalability is the property of a system to handle a growing amount of work by adding resources to the system. In an economic context, a scalable business model implies that a company can increase sales given increased resources. For example, a ...
, reliability and resource usage. Performance testing, a subset of performance engineering, is a
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
practice which strives to build performance standards into the implementation, design and architecture of a system.


Testing types


Load testing

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 ...
is the simplest form of performance testing. A load test is usually conducted to understand the behavior of the system under a specific expected load. This load can be the expected concurrent number of users on the
application Application may refer to: Mathematics and computing * Application software, computer software designed to help the user to perform specific tasks ** Application layer, an abstraction layer that specifies protocols and interface methods used in a c ...
performing a specific number of transactions within the set duration. This test will give out the response times of all the important business critical transactions. The
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases ...
,
application server An application server is a server that hosts applications or software that delivers a business application through a communication protocol. An application server framework is a service layer model. It includes software components available to a ...
, etc. are also monitored during the test, this will assist in identifying
bottleneck Bottleneck literally refers to the narrowed portion (neck) of a bottle near its opening, which limit the rate of outflow, and may describe any object of a similar shape. The literal neck of a bottle was originally used to play what is now known as ...
s in the application software and the hardware that the software is installed on.


Stress testing

Stress testing Stress testing (sometimes called torture testing) is a form of deliberately intense or thorough testing used to determine the stability of a given system, critical infrastructure or entity. It involves testing beyond normal operational capacity, ...
is normally used to understand the upper limits of capacity within the system. This kind of test is done to determine the system's robustness in terms of extreme load and helps application administrators to determine if the system will perform sufficiently if the current load goes well above the expected maximum.


Soak testing

Soak testing, also known as endurance testing, is usually done to determine if the system can sustain the continuous expected load. During soak tests, memory utilization is monitored to detect potential leaks. Also important, but often overlooked is performance degradation, i.e. to ensure that the throughput and/or response times after some long period of sustained activity are as good as or better than at the beginning of the test. It essentially involves applying a significant load to a system for an extended, significant period of time. The goal is to discover how the system behaves under sustained use.


Spike testing

Spike testing is done by suddenly increasing or decreasing the load generated by a very large number of users, and observing the behavior of the system. The goal is to determine whether performance will suffer, the system will fail, or it will be able to handle dramatic changes in load.


Breakpoint testing

Breakpoint testing is similar to stress testing. An incremental load is applied over time while the system is monitored for predetermined failure conditions. Breakpoint testing is sometimes referred to as Capacity Testing because it can be said to determine the maximum capacity below which the system will perform to its required specifications or Service Level Agreements. The results of breakpoint analysis applied to a fixed environment can be used to determine the optimal scaling strategy in terms of required hardware or conditions that should trigger scaling-out events in a cloud environment.


Configuration testing

Rather than testing for performance from a load perspective, tests are created to determine the effects of configuration changes to the system's components on the system's performance and behavior. A common example would be experimenting with different methods of load-balancing.


Isolation testing

Isolation testing is not unique to performance testing but involves repeating a test execution that resulted in a system problem. Such testing can often isolate and confirm the fault domain.


Internet testing

This is a relatively new form of performance testing when global applications such as Facebook, Google and Wikipedia, are performance tested from load generators that are placed on the actual target continent whether physical machines or cloud VMs. These tests usually requires an immense amount of preparation and monitoring to be executed successfully.


Setting performance goals

Performance testing can serve different purposes: * It can demonstrate that the system meets performance criteria. * It can compare two systems to find which performs better. * It can measure which parts of the system or workload cause the system to perform badly. Many performance tests are undertaken without setting sufficiently realistic, goal-oriented performance goals. The first question from a business perspective should always be, "why are we performance-testing?". These considerations are part of the
business case A business case captures the reasoning for initiating a project or task. It is often presented in a well-structured written document, but may also come in the form of a short verbal agreement or presentation. The logic of the business case is that ...
of the testing. Performance goals will differ depending on the system's technology and purpose, but should always include some of the following:


Concurrency and throughput

If a system identifies end-users by some form of log-in procedure then a concurrency goal is highly desirable. By definition this is the largest number of concurrent system users that the system is expected to support at any given moment. The work-flow of a scripted transaction may impact true concurrency especially if the iterative part contains the log-in and log-out activity. If the system has no concept of end-users, then performance goal is likely to be based on a maximum throughput or transaction rate.


Server response time

This refers to the time taken for one system node to respond to the request of another. A simple example would be a HTTP 'GET' request from browser client to web server. In terms of response time this is what all
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 ...
tools actually measure. It may be relevant to set server response time goals between all nodes of the system.


Render response time

Load-testing tools have difficulty measuring render-response time, since they generally have no concept of what happens within a
node In general, a node is a localized swelling (a " knot") or a point of intersection (a vertex). Node may refer to: In mathematics * Vertex (graph theory), a vertex in a mathematical graph * Vertex (geometry), a point where two or more curves, line ...
apart from recognizing a period of time where there is no activity 'on the wire'. To measure render response time, it is generally necessary to include functional
test script A test script in software testing is a set of instructions that will be performed on the system under test to test that the system functions as expected. Types of test scripts There are various means for executing test scripts. These last two ...
s as part of the performance test scenario. Many load testing tools do not offer this feature.


Performance specifications

It is critical to detail performance specifications (requirements) and document them in any performance test plan. Ideally, this is done during the requirements development phase of any system development project, prior to any design effort. See Performance Engineering for more details. However, performance testing is frequently not performed against a specification; e.g., no one will have expressed what the maximum acceptable response time for a given population of users should be. Performance testing is frequently used as part of the process of performance profile tuning. The idea is to identify the "weakest link" – there is inevitably a part of the system which, if it is made to respond faster, will result in the overall system running faster. It is sometimes a difficult task to identify which part of the system represents this critical path, and some test tools include (or can have add-ons that provide) instrumentation that runs on the server (agents) and reports transaction times, database access times, network overhead, and other server monitors, which can be analyzed together with the raw performance statistics. Without such instrumentation one might have to have someone crouched over
Windows Task Manager Task Manager, previously known as Windows Task Manager, is a task manager, system monitor, and startup manager included with Microsoft Windows systems. It provides information about computer performance and running software, including name of ...
at the server to see how much CPU load the performance tests are generating (assuming a Windows system is under test). Performance testing can be performed across the web, and even done in different parts of the country, since it is known that the response times of the internet itself vary regionally. It can also be done in-house, although routers would then need to be configured to introduce the lag that would typically occur on public networks. Loads should be introduced to the system from realistic points. For example, if 50% of a system's user base will be accessing the system via a 56K modem connection and the other half over a T1, then the load injectors (computers that simulate real users) should either inject load over the same mix of connections (ideal) or simulate the network latency of such connections, following the same user profile. It is always helpful to have a statement of the likely peak number of users that might be expected to use the system at peak times. If there can also be a statement of what constitutes the maximum allowable 95 percentile response time, then an injector configuration could be used to test whether the proposed system met that specification.


Questions to ask

Performance specifications should ask the following questions, at a minimum: * In detail, what is the performance test scope? What subsystems, interfaces, components, etc. are in and out of scope for this test? * For the user interfaces (UIs) involved, how many concurrent users are expected for each (specify peak vs. nominal)? * What does the target system (hardware) look like (specify all server and network appliance configurations)? * What is the Application Workload Mix of each system component? (for example: 20% log-in, 40% search, 30% item select, 10% checkout). * What is the System Workload Mix? ultiple workloads may be simulated in a single performance test(for example: 30% Workload A, 20% Workload B, 50% Workload C). * What are the time requirements for any/all back-end batch processes (specify peak vs. nominal)?


Prerequisites

A stable build of the system which must resemble the production environment as closely as is possible. To ensure consistent results, the performance testing environment should be isolated from other environments, such as
user acceptance testing In engineering and its various subdisciplines, acceptance testing is a test conducted to determine if the requirements of a specification or contract are met. It may involve chemical tests, physical tests, or performance tests. In systems en ...
(UAT) or development. As a best practice it is always advisable to have a separate performance testing environment resembling the production environment as much as possible.


Test conditions

In performance testing, it is often crucial for the test conditions to be similar to the expected actual use. However, in practice this is hard to arrange and not wholly possible, since production systems are subjected to unpredictable workloads. Test workloads may mimic occurrences in the production environment as far as possible, but only in the simplest systems can one exactly replicate this workload variability. Loosely-coupled architectural implementations (e.g.: SOA) have created additional complexities with performance testing. To truly replicate production-like states, enterprise services or assets that share a common
infrastructure Infrastructure is the set of facilities and systems that serve a country, city, or other area, and encompasses the services and facilities necessary for its economy, households and firms to function. Infrastructure is composed of public and priv ...
or platform require coordinated performance testing, with all consumers creating production-like transaction volumes and load on shared infrastructures or platforms. Because this activity is so complex and costly in money and time, some organizations now use tools to monitor and simulate production-like conditions (also referred as "noise") in their performance testing environments ( PTE) to understand capacity and resource requirements and verify / validate quality attributes.


Timing

It is critical to the cost performance of a new system that performance test efforts begin at the inception of the development project and extend through to deployment. The later a performance defect is detected, the higher the cost of remediation. This is true in the case of functional testing, but even more so with performance testing, due to the end-to-end nature of its scope. It is crucial for a performance test team to be involved as early as possible, because it is time-consuming to acquire and prepare the testing environment and other key performance requisites.


Tools

Performance testing is mainly divided into two main categories:


Performance scripting

This part of performance testing mainly deals with creating/scripting the work flows of key identified business processes. This can be done using a wide variety of tools. Each of the tools mentioned in the above list (which is not exhaustive nor complete) either employs a scripting language (C, Java, JS) or some form of visual representation (drag and drop) to create and simulate end user work flows. Most of the tools allow for something called "Record & Replay", where in the performance tester will launch the testing tool, hook it on a browser or thick client and capture all the network transactions which happen between the client and server. In doing so a script is developed which can be enhanced/modified to emulate various business scenarios.


Performance monitoring

This forms the other face of performance testing. With performance monitoring, the behavior and response characteristics of the application under test are observed. The below parameters are usually monitored during the a performance test execution Server hardware Parameters * CPU Utilization * Memory Utilization * Disk utilization * Network utilization As a first step, the patterns generated by these 4 parameters provide a good indication on where the bottleneck lies. To determine the exact root cause of the issue,
software engineer Software engineering is a systematic engineering approach to software development. A software engineer is a person who applies the principles of software engineering to design, develop, maintain, test, and evaluate computer software. The term ''p ...
s use tools such as profilers to measure what parts of a device or software contribute most to the poor performance, or to establish throughput levels (and thresholds) for maintained acceptable response time.


Technology

Performance testing technology employs one or more PCs or Unix servers to act as injectors, each emulating the presence of numbers of users and each running an automated sequence of interactions (recorded as a script, or as a series of scripts to emulate different types of user interaction) with the host whose performance is being tested. Usually, a separate PC acts as a test conductor, coordinating and gathering metrics from each of the injectors and collating performance data for reporting purposes. The usual sequence is to ramp up the load: to start with a few virtual users and increase the number over time to a predetermined maximum. The test result shows how the performance varies with the load, given as number of users vs. response time. Various tools are available to perform such tests. Tools in this category usually execute a suite of tests which emulate real users against the system. Sometimes the results can reveal oddities, e.g., that while the average response time might be acceptable, there are outliers of a few key transactions that take considerably longer to complete – something that might be caused by inefficient database queries, pictures, etc. Performance testing can be combined with
stress testing Stress testing (sometimes called torture testing) is a form of deliberately intense or thorough testing used to determine the stability of a given system, critical infrastructure or entity. It involves testing beyond normal operational capacity, ...
, in order to see what happens when an acceptable load is exceeded. Does the system crash? How long does it take to recover if a large load is reduced? Does its failure cause collateral damage? Analytical Performance Modeling is a method to model the behavior of a system in a spreadsheet. The model is fed with measurements of transaction resource demands (
CPU A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
, disk I/O,
LAN Lan or LAN may also refer to: Science and technology * Local asymptotic normality, a fundamental property of regular models in statistics * Longitude of the ascending node, one of the orbital elements used to specify the orbit of an object in spa ...
, WAN), weighted by the transaction-mix (business transactions per hour). The weighted transaction resource demands are added up to obtain the hourly resource demands and divided by the hourly resource capacity to obtain the resource loads. Using the response time formula (R=S/(1-U), R=response time, S=service time, U=load), response times can be calculated and calibrated with the results of the performance tests. Analytical performance modeling allows evaluation of design options and system sizing based on actual or anticipated business use. It is therefore much faster and cheaper than performance testing, though it requires thorough understanding of the hardware platforms.


Tasks to undertake

Tasks to perform such a test would include: * Decide whether to use internal or external resources to perform the tests, depending on inhouse expertise (or lack of it). * Gather or elicit performance requirements (specifications) from users and/or business analysts. * Develop a high-level
plan A plan is typically any diagram or list of steps with details of timing and resources, used to achieve an objective to do something. It is commonly understood as a temporal set of intended actions through which one expects to achieve a goal. ...
(or project charter), including requirements, resources, timelines and milestones. * Develop a detailed performance
test plan A test plan is a document detailing the objectives, resources, and processes for a specific test for a software or hardware product. The plan typically contains a detailed understanding of the eventual workflow. Test plans A test plan documents th ...
(including detailed scenarios and
test case In software engineering, a test case is a specification of the inputs, execution conditions, testing procedure, and expected results that define a single test to be executed to achieve a particular software testing objective, such as to exercise ...
s, workloads, environment info, etc.). * Choose test tool(s). * Specify test data needed and charter effort (often overlooked, but vital to carrying out a valid performance test). * Develop proof-of-concept scripts for each application/component under test, using chosen test tools and strategies. * Develop detailed performance test project plan, including all dependencies and associated timelines. * Install and configure injectors/controller. * Configure the test environment (ideally identical hardware to the production platform), router configuration, quiet network (we don't want results upset by other users), deployment of server instrumentation, database test sets developed, etc. * Dry run the tests - before actually executing the load test with predefined users, a dry run is carried out in order to check the correctness of the script. * Execute tests – probably repeatedly (iteratively) in order to see whether any unaccounted-for factor might affect the results. * Analyze the results - either pass/fail, or investigation of critical path and recommendation of corrective action.


Methodology


Performance testing web applications

According to the Microsoft Developer Network the Performance Testing Methodology consists of the following activities: # Identify the Test Environment. Identify the physical test environment and the production environment as well as the tools and resources available to the test team. The physical environment includes hardware, software, and network configurations. Having a thorough understanding of the entire test environment at the outset enables more efficient test design and planning and helps you identify testing challenges early in the project. In some situations, this process must be revisited periodically throughout the project's
life cycle Life cycle, life-cycle, or lifecycle may refer to: Science and academia *Biological life cycle, the sequence of life stages that an organism undergoes from birth to reproduction ending with the production of the offspring * Life-cycle hypothesis ...
. # Identify Performance Acceptance Criteria. Identify the response time, throughput, and resource-use goals and constraints. In general, response time is a user concern, throughput is a business concern, and resource use is a system concern. Additionally, identify project success criteria that may not be captured by those goals and constraints; for example, using performance tests to evaluate which combination of configuration settings will result in the most desirable performance characteristics. # Plan and Design Tests. Identify key
scenario In the performing arts, a scenario (, ; ; ) is a synoptical collage of an event or series of actions and events. In the ''commedia dell'arte'', it was an outline of entrances, exits, and action describing the plot of a play, and was literally pi ...
s, determine variability among representative users and how to simulate that variability, define test data, and establish metrics to be collected. Consolidate this information into one or more models of system usage to implemented, executed, and analyzed. # Configure the Test Environment. Prepare the test environment, tools, and resources necessary to execute each strategy, as features and components become available for test. Ensure that the test environment is instrumented for resource monitoring as necessary. # Implement the Test Design. Develop the performance tests in accordance with the test design. # Execute the Test. Run and monitor your tests. Validate the tests, test data, and results collection. Execute validated tests for analysis while monitoring the test and the test environment. # Analyze Results, Tune, and Retest. Analyze, consolidate, and share results data. Make a tuning change and retest. Compare the results of both tests. Each improvement made will return smaller improvement than the previous improvement. When do you stop? When you reach a CPU bottleneck, the choices then are either improve the code or add more CPU.


See also

* * * {{DEFAULTSORT:Software Performance Testing Software testing Software optimization fr:Test de performance