Load ui web Load Testing Open source Performance Testing tool Learn Load UI Web Tutorials
Load Testing Best Practices
-
Upload
apica-systems -
Category
Technology
-
view
72 -
download
0
Transcript of Load Testing Best Practices
![Page 1: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/1.jpg)
Load Testing Best Practices
![Page 2: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/2.jpg)
Why Load Test?
![Page 3: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/3.jpg)
Performance MattersOrganizations with degraded business apps (IDG)
Problems identified for IT by end-users (EMA)- employees – 43%- business stakeholders – 13% - customers – 12% Problems resolved > 1 month, if ever (Forrester)
Engineering time spent in triage (TechValidate)
75%68%
31%40%
![Page 4: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/4.jpg)
Unit and Functional Tests Don’t Find Everything• Concurrency Bugs
– Bugs that only present when same code is run multiple times at the same time
• Compositional Bugs– Bugs caused by the interplay between separate pieces of your
application• DB Indexes and Locks
– Do the indexes and query locks on your database play nicely at load• Application or Web Server Configuration
– Do your application or web servers exceed memory, socket, or other configuration constraints
• Infrastructure Limitations– Bandwidth, Session Tables, Disk IO, Etc.
![Page 5: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/5.jpg)
Application complexity is Increasing
![Page 6: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/6.jpg)
THEN
![Page 7: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/7.jpg)
Application Complexity is IncreasingNOW
![Page 8: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/8.jpg)
Can You Answer These Basic Questions?• What are your application’s bottlenecks?
• Performance at normal and peak usage levels?
• Most common causes of performance issues or load based failures?
• Is your hardware optimized to meet business objectives?
![Page 9: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/9.jpg)
What kind of load test should you use?
![Page 10: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/10.jpg)
Load Test Types
Stress Concurrency
Disaster Recovery
![Page 11: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/11.jpg)
Stress Tests
Continuously increase load to determine absolute theoretical bottlenecks and breaking points
• Start with known good traffic levels• Run successive tests while doubling the traffic each time• When breaking point is found, you can run tests between
the last successful test and this one to find your exact breaking point(s)
![Page 12: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/12.jpg)
Concurrency Tests
Realistic traffic to find practical performance and failure limits
• Determine your actual traffic levels (average and peak), and the ratio of user flows/actions
• Run a combination of load tests that simulate realistic traffic• Perform “what if” tests by either changing the mix of user
flows/actions, or increasing the load of one or more of them• Concurrency Tests against auto-scaling environments can
test scaling response times
![Page 13: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/13.jpg)
Disaster Recovery Tests
Sustained traffic at realistic load levels to test application response to failures
• Start a long-running load test• Simulate various application or infrastructure failures (e.g.
turn off a web server, or unplug a DB)• See if failover processes work as intended, and as fast as
required• DR tests without simulated failures are ENDURANCE tests
![Page 14: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/14.jpg)
Recording load test scripts
![Page 15: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/15.jpg)
Questions to Ask When Recording Scripts
What do you want to know?• Max concurrent users before failure• Performance at expected peak• 3rd party content impact on performance• Current bottlenecks• Auto-scaling results at various loads• Etc.
![Page 16: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/16.jpg)
Questions to Ask When Recording Scripts
What requests matter?• Do you care about static/CDN served content?• Do you need to include 3rd party content?• Do supporting requests (e.g. auto-populate) matter?
![Page 17: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/17.jpg)
Questions to Ask When Recording Scripts
Do you need unique or dynamic data?• Usernames and passwords• Form data (e.g. dates)• Product or record ID’s• Etc.
![Page 18: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/18.jpg)
Questions to Ask When Recording Scripts
What constitutes a failure?• Content verification• HTTP Status checks• General or request specific time limits• Unusual response sizes
![Page 19: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/19.jpg)
Steps to Recording Scripts1. Determine the user flow2. Record using a proxy recorder3. Remove unnecessary requests4. Handle variables5. Add external data6. Configure failure detection
![Page 20: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/20.jpg)
Running Load Tests
![Page 21: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/21.jpg)
Considerations when running Load Tests•SaaS vs Private•Target Environment (Dev, DR, Prod)•Other performance metrics (APM, etc.)•Database preparation•Team communication methods•Criteria for aborting
![Page 22: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/22.jpg)
Interpreting Results
![Page 23: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/23.jpg)
What Does It Mean? (Load Curves)
USERSSESS
ION
DU
RATI
ON
USERSTH
ROU
GH
PUT
USERSFAIL
URE
S / E
RRO
RS
Ideal Results
![Page 24: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/24.jpg)
What Does It Mean? (Load Curves)
USERSSESS
ION
DU
RATI
ON
USERSTH
ROU
GH
PUT
USERSFAIL
URE
S / E
RRO
RS
Finding Peak Load
SAFE PEAK UNSTABLE
![Page 25: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/25.jpg)
When to Load Test
![Page 26: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/26.jpg)
Load Testing @ Deployment Stages• Dev Environments
– Good for finding problems early, but unreliable for absolute performance metrics– Catch concurrency, composition, or DB problems
• Staging/QA Environments– Catch problems caused by rolled up commits that weren’t visible when testing singular changes– Compare to previous runs to get early warnings for reduced performance or peak capacity– May or may not be reliable indicators of production performance depending on the stability of the
environment, and similarity to the production environment• Pre-Production
– Should be as close to the production environment as possible– Best indication of production performance and load capacity before live deployment
• Production– Useful for absolute verification of readiness for expected traffic spikes (e.g. product launces, sales,
holidays, marketing events)– Can be used for periodic validations (DR, seamless code deployment, performance validation)
![Page 27: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/27.jpg)
Questions?
![Page 28: Load Testing Best Practices](https://reader035.fdocuments.net/reader035/viewer/2022070518/58e8cd5f1a28abb3398b5009/html5/thumbnails/28.jpg)
Additional Resources
apicasystems.com: Enterprise cloud and mobile performance solutions- Whitepapers, Webinars, Case Studies- Blog- Download Apica Zebratester Free Edition | 50 Free VUs
- Signup for Apica LoadTest Free Trial | 500 Free VUs- Signup for Apica Monitoring Free Trial
community.zebratester.com: Load test community