introduction to performance testing part 1
TRANSCRIPT
![Page 1: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/1.jpg)
Introduction toPerformance TestingPart 1(V1.1)
Author:Vjacheslav LukashevichEdited by:Eugene Muran
![Page 2: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/2.jpg)
Part 2
Part 1•Test types•Measurements and scenarios•Testing team•Test tools•Planning and Implementing tests
•Tool Configuration•Test Run•Result analysis•Facts about development
![Page 3: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/3.jpg)
Fact is that -…
![Page 4: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/4.jpg)
No one cares about software
performance at beginning
Fact is that -…
![Page 5: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/5.jpg)
And at the end we get something like this …
![Page 6: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/6.jpg)
Or even worse…
![Page 7: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/7.jpg)
SMALL REMARK:
ALL OF ABOVE MENTIONED
IS ALREADY IN THE PAST
![Page 8: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/8.jpg)
Our days
![Page 9: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/9.jpg)
When performance testing is a “must”
We expect large data volumesWe expect high loadInexperienced programmersCustomer requests it
![Page 10: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/10.jpg)
Question!
What types of performance testing exist?
![Page 11: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/11.jpg)
Test typesPerformance TestingLoad Testing
Stress TestingEndurance testingScalability testingRecoverability testing
How we name it - depends on test target!
![Page 12: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/12.jpg)
Question!
What we will measure by the performance testing?
![Page 13: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/13.jpg)
Application “speed” performance characteristics
Throughput – number of actions per time moment.
Response Time – time taken by action to complete
![Page 14: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/14.jpg)
Application hardware characteristics
Primary resources:CPU (%)
Total CPU usage on hostCPU usage by target process
Memory UsageUsed Memory (on host or by process)Available Memory
NetworkNumber of bytes sent/received per second through network interface
![Page 15: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/15.jpg)
Bottleneck
“Bottleneck” is the place where performance degradation occurs
![Page 16: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/16.jpg)
Scalability
Ability to handle additional workload when:Adding hardware (memory, CPU, storage)Adding additional hosts (machines)
![Page 17: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/17.jpg)
Performance test targets
Common targets:Get performance statistics (application speed)Find bugs (software stability issues)Find out bottleneck’sFind out capacityEstablish baselines
Other targetsScalability checkCrash testRecovery test
Each test is a scenario or a set of scenarios
![Page 18: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/18.jpg)
Question!
Who is participating in performance testing?
![Page 19: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/19.jpg)
Relationship Between Performance Testing and Tuning
Performance Tests
Performance Characteristics
Performance Tuning
Tuning process is done when:performance testing reveals system or application characteristics unacceptable to reduce the amount of resources being used
![Page 20: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/20.jpg)
Performance tuning
Cooperative effortProduct vendors Architects Developers Testers Database administrators System administrators Network administrators
![Page 21: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/21.jpg)
Performance testing activities
1. Identify the test environment
2. Plan and Design tests3. Configure the Test
Environment4. Implement the Test Design5. Execute the Test6. Analyze Results, Report,
and Retest
![Page 22: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/22.jpg)
Identifying test environment:Hardware
In ideal case test environment must be as close to production environment as possible
![Page 23: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/23.jpg)
Identifying test environment:Software –key components
Operation System(MS Windows, Linux,…)
Application Server(IBM Websphere, BEA Weblogic, Tomcat, …)
Database Server(IBM DB2,Oracle,MS SQL Server, …)
![Page 24: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/24.jpg)
Identifying test environment:Software
For performance tests key software components in environment must be as close as possible to production environment –can impact overall system performance
VERSION#
->Patch VERSION#
(Build #)
Configuration
<Settings>
<<Java version>>
![Page 25: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/25.jpg)
Performance testing scenarios
Scenario:Sequence of steps in applicationRepresents a use case
![Page 26: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/26.jpg)
Question!
What scenarios we need to test?
![Page 27: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/27.jpg)
Plan and Design tests:Determining Test Scenarios
Key Usage scenarios to include:most common, frequentbusiness-criticalperformance-intensivetechnical concern high-visibility, obviouscontractually obligatedstakeholder concern
![Page 28: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/28.jpg)
Applying usage pattern for test design
Daytime user activity
0
500
1000
1500
2000
2500
3000
3500
4000
4500
Use
r Act
ions
per
hou
r
Options:1) Emulate exact usage pattern2) Run under maximum load (peak
load)3) Run under average load
Peak load
![Page 29: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/29.jpg)
Most important - performance scenario must be Repeatable (!)
Plan and Design tests:Determining Test Scenarios
![Page 30: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/30.jpg)
Repeatable test scenario
Dataprerequisitescleanup
Tests sequenceEnvironment state
![Page 31: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/31.jpg)
Performance Test Plan
Test Plan contentTest environment Test dataTest scenariosPerformance Measurements
PERFORMANCE TEST PLAN
![Page 32: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/32.jpg)
Test Plan: Test Data and Test Scenarios
Test prerequisites:DatabaseUsers Files (documents, images …)
Test ParametersScenarios listThink timeLoad SchemeDuration
![Page 33: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/33.jpg)
TEST IMPLEMENTATION
![Page 34: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/34.jpg)
Environment setup
Application deploymentDatabase setup Users/ Access RightsSystem clock synchronizationPerformance Monitoring services configuration
![Page 35: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/35.jpg)
Stable version
For performance testing it is preferable to select stable, well tested using functional testing application version
To avoid the surprises for the performance testing it is preferable
to select stable, well tested by functional testing application version
Plan it and target for it!
![Page 36: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/36.jpg)
Perform the smoke testing!
Before beginning the scripting, verify that the scenarios you are going to implement in your test script are working at all!
![Page 37: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/37.jpg)
TESTING TOOLS
![Page 38: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/38.jpg)
2 Main Purposes of test tools
Load Generation
Measurements/Statistics gathering
Best thing, if the tool can do this both tasks in parallel
![Page 39: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/39.jpg)
2 ways to emulate web application
“Play” with browserLinks/Button clicksForm filling
Send POST/GET request to server
![Page 40: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/40.jpg)
What tools we have for such testing?
LoadRunner(different protocols: POST/GET, web browser emulation/GWT/Mobile/SAP)
Jmeter (POST/GET)
Grinder(POST/GET)
*this is only some of available tooling
![Page 41: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/41.jpg)
Capture/Replay
Pluses (+)Fast and easy test creation
Minuses (-)Unstable scriptsApplication change sensitivityUnnecessary requests in scriptsOverhead on server side for replayed scripts
![Page 42: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/42.jpg)
Tests debug
Like any computer program, performance tests also must be tested
Possible checksView returned pages during replay in test tool (in LR - visual test results)Test tool logsServer logs
![Page 43: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/43.jpg)
Content check
Check content, that is only available, when system operates correctly
![Page 44: Introduction to Performance Testing Part 1](https://reader036.vdocuments.site/reader036/viewer/2022062412/58a454631a28ab55068b5bab/html5/thumbnails/44.jpg)
Books
Performance Testing Guidance for Web Applications
http://perftestingguide.codeplex.com/downloads/get/17955
Web load for dummies