0% found this document useful (0 votes)
47 views

7 Performance Testing

Performance testing involves planning, executing tests, and analyzing results to ensure applications meet response time, throughput, and scalability goals. Key steps include defining metrics and goals upfront, designing representative workload profiles, and stress testing to identify bottlenecks. The testing environment should mirror production. Analysis focuses on resource utilization, errors, and response times to determine breakpoints and tune performance as needed.

Uploaded by

panneer1981
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

7 Performance Testing

Performance testing involves planning, executing tests, and analyzing results to ensure applications meet response time, throughput, and scalability goals. Key steps include defining metrics and goals upfront, designing representative workload profiles, and stress testing to identify bottlenecks. The testing environment should mirror production. Analysis focuses on resource utilization, errors, and response times to determine breakpoints and tune performance as needed.

Uploaded by

panneer1981
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

Unit 40: Software Testing

Performance Testing

Agenda

1. 1.Performance PerformanceTest TestPlanning Planning 2. 2.Performance PerformanceTest Test Execution Execution 3. 3.Performance PerformanceAnal Anal sis! sis!Tuning Tuning

Terms ou need to "now


Performance is concerned with achieving response times, throughput,
resource utilization levels that meet you performance objectives

Scalability refers to the ability to handle additional workload, without Throughput is the number or re"uests that can be served by your
application per unit time#

adversely affecting performance, by adding resources such as P!, memory and storage capacity

$esource !tilization is the cost in terms of resources%


memory, disk &'(, network &'(

P!,

Server )atency *

is the time the server takes to complete the e+ecution of a re"uest# Server latency does not include network latency ,additional time that it takes for a re"uest and a response to cross a network#-

.orkload typically derived from marketing data# &ncludes total number of


users, concurrent active users, data volumes and transaction volumes, along with the transaction mi+#

#ntroduction
.hen designing an application that will be accessed over the &nternet, development teams must keep in mind that hundreds of thousands of users could concurrently access the application# This concurrent user load could%
place tremendous stress upon a system ,resource usage-, cause une+pected delays, and result in a poor user e+perience#

/owever, if the application has been ade"uately tested and tuned for optimal performance under stress, managers and software developers will be confident that their code will perform at optimal levels and have the necessary data to plan site capacity needs#

Performance Testing Ste$s:


Ste$ 1% Planning
0# 3# 5# 6# 1efine ritical Performance 2etrics 1efine 2in'2a+ 4alues of Performance 2etrics reate Site !sage Profile reate Performance Testing 7nvironment

Ste$ 2% 1esign and $un Performance Tests


0# 3# 5# reate dynamic scripts 4erify script functionality 7+ecute Performance Tests

Ste$ 3% Performance 8nalysis, Tuning and $eporting


9etwork, ode, 8SP#97T, S:) analysis Performance Tuning

%ig&'le(el $erformance goals


Performance goals are critical to ensure our )e* a$$lication meets or exceeds current or future $ro+ected re,uirements# /ow to specify performance goals;
The best approach is to use historical data or e+tensive marketing research#

7+amples of poor planning are e*commerce .eb applications that can<t handle the peak holiday shopping rush# $esult is lost sales, and bad press as well#

Esta*lis& Performance -riteria


7arly in 1evelopment ycle, testers and system analysts work together to compose $e"uirements specification document to define the performance criteria for the application being developed# 8n e+ample of performance re"uirement%
When 500 people access the application at the same time, response time for 95% of the transactions must be within 4 seconds for database request. esponse time is e!pected to de"rade for lar"er number of users e!ercisin" business and administrati#e tas$s.

$eal .orld 7+ample=Site Performance >oals


?or 2icrosoft<s e*commerce &nternet sites, we define maximum t&roug&$ut .scala*ilit / for gi(en user scenarios such as browsing products, adding products to a shopping basket, and checking out# .e test the throughput for these scenarios both separately and while running in what is called a @mi+ed test#A 1efining the ma+imum throughput of 2icrosoft<s e*commerce sites directly depends on what the minimum $erformance goals are#
?or e+ample, all pages must load within 10 seconds, average CPU utilization on servers must be less than 70 percent, and available memory must remain stable throughout the period of the test, all while the site is maintaining 10 customer checkouts per second !hen page response times degrade to 11 seconds at higher throughput rates, the site is considered to be performing unacceptably "t this point, it is time to figure out what is causing and contributing to the unacceptable response time #n this manner, performance goals set in the planning phase drive break points during the performance$testing phase

Performance o*+ecti(es
Performance objectives are usually specified in terms of the following%
1. 0es$onse time# $esponse time is the amount of time that it takes for a server to respond to a re"uest# 1. T&roug&$ut# Throughput is the number of re"uests that can be served by your application per unit time# Throughput is fre"uently measured as re"uests or logical transactions per second# 1. )or"load# .orkload includes the total number of users and concurrent acti#e users, data volumes, and transaction volumes 1. 0esource utili1ation# $esource utilization is the measure of how much server and network resources are consumed by your application# $esources include P!, memory, disk &'(, and network &'(# 0# ?uture performance growth re"uirements

Performance 2isuali1ation Bou can visualize performance as four' legged stool


&f you are going to change the length of one leg, you will likely have to change at least one of the other legs as well if you want the stool to still remain standing
T&e end3s user &ardware 4 of concurrent users 0es$onse Time

Software 5ogic

Step 0: Set t&e Testing Parameters and setu$ t&e en(ironment


#dentif Use -ases .scenarios- for Testing like making a purchase and how the user logs in, selects a product, and enters credit card information 7stablish Site Performance 6oals and 7etrics like
.eb Page )oad TimeC Throughput ,transactions'sec- for given user scenario $esource !tilization , P! and memory2a+imum 9umber of oncurrent !sersC

1epending on !ser Dandwidth ,EFk, 03Gk, 3EFk, etc-, /ardware , P!, $82, /11 space-

0es$onse Time 6oals


#dentif connection s$eeds and latenc of your potential customers# This can help you determine an acceptable amount of time it can take to load each page of your .eb application# (nce you have identified how your user base will access your .eb application, you can determine your res$onse time acce$ta*ilit targets.
These targets define how long it can acceptably take for user scenarios or content to load on various connections

?or e+ample, with

all things being e%ual, a 70$kilobyte page will obviously load faster on a &'($kbps )*+ connection than on a &, ,$kbps modem connection -he response time acceptability for your &, ,$kbps modem might be 1' seconds, while the &'($kbps )*+ connection might be significantly less, at ' seconds
Predicted Connection Speeds User Line Speed Latenc# Worst Connection 28.8-kbps modem !$$$ mi%%iseconds Average Connection 256-kbps SL !$$ mi%%iseconds Best Connection !.5-mbps "! 5$ mi%%iseconds

User 0eaction to 0es$onse time


H#0 second
is the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary e+cept to display the result#

0#H second
is the limit for the user<s flow of thought to stay uninterrupted, even though the user will notice the delay# 9ormally, no special feedback is necessary during delays of more than H#0 but less than 0#H second, but the user does lose the feeling of operating directly on the data#

0H seconds
is the limit for keeping user attention focused on the screen dialogue# ?or longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer is likely to be done# ?eedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to e+pect#

T&roug&$ut and -oncurrent User 6oals


/ow many concurrent users do we currently sustain or e+pect in a given time period; .hat actions does a typical user perform on our .eb application and which pages receive the most page views in a given time period; /ow many user scenarios will my .eb application process in a given time period;
User &perations Basic Searc( Bro-se .or Prod)ct Add to Cart Login and C(ecko)t 'egister and C(ecko)t "ota% 'atio !*+ 62+ !$+ /+ /+ !$$+ Anticipated Load per (o)r !,*$$ 6,2$$ !,$$$ /$$ /$$ !$,$$$

8e Performance 7etrics -riteria


The breakpoint of your .eb application can be defined in various ways# 7+amples include%
a server that e+ceeds predefined resource utilization targets, too many server errors, or unacceptable response times due to processing delays
Per.ormance 0etrics and Acceptab%e Leve%s 0etric CPU )ti%i1ation 0emor#3avai%ab%e 0B ASP e5ec)tion time B processing de%a#s Web tier processing de%a#s Location Per.ormance 0onitor Per.ormance 0onitor Per.ormance 0onitor S6L Pro.i%er "ime "aken .ie%d o. Web %ogs Acceptab%e Leve% 2 /5+ 4 !28 0B 2 ! second 2 5$$ mi%%iseconds 2 ! second

Performance 6rowt& Anal sis


8 performance growth analysis is re"uired if your .eb application user base is e+pected to grow over a given time period Execute t&e stress test with more load and with higher levels of concurrent users to predict future bottlenecks The easiest way to determine the growth capacity of your .eb application is to calculate the increase in volume you are currently e!periencin" over a specific period of time

9rom Planning to Execution


The performance test en(ironment should be as close to the production environment as possible# This includes% the server capacity and configuration, network environment, database# .hen performance planning is completed, our focus shifts to utili1ing software load simulation tools for pushing .eb applications to their performance breakpoints# The goal during the performance testing phase is to define t&e real'world $erformance limits for t&e )e* a$$lication#

Step 3: 0un Performance Tests


.ith the software method, user transaction scenarios are t $icall recorded or captured by a software tool and converted to test scripts# .hen playing back or e+ecuting a test script, one machine typically acts as a controller to distribute the test script across multiple client machines# 8s the test runs, the controller simulates man (irtual simultaneous users. .hen the test is complete, it summari1es t&e test data from all of t&e clients# These virtual users create load on the backend servers and help to determine the stability and responsiveness of the .eb application

Step 5: Performance Anal sis! Tuning and 0e$orting

Anal sis of an *ottlenec"s in the environment should be provided% A$$lication :etwor" Anal sis Network Latency the time it takes for a data packet to move across a network connection# Network roundtrips each image, style sheet, or other page element defined in the response to your re"uest ,from the .eb server- is counted as a separate network round trip# 8dditional round trips are involved in the setup of each connection to the .eb server Data transferred kilobits per second and kilobytes of data transferred Ser(er 0esource Usage Anal sis Memory usage CPU usage HDD space -ode Performance Anal sis Shows you where your application e+ecution time or memory is being utilized ,in which class or methodS;5 <ata*ase Anal sis Poorly written "ueries

Dased on Performance 8nalysis, recommendations for tuning should be provided

You might also like