Short presentation on how to start performance testing. Going from phase of requirement gathering to the writing your first test scripts and using performance test tool. Glance over JMeter - open source performance testing tool.
5. Badly formulated
“We expect 20 million users per year.”
“We anticipate 50,000 users a day.”
https://stocksnap.io/author/5574 Avel Chuklanov
6. How to format Requirements?
● What does web site needs to do well?
● What is usage pattern of the proposed system?
● What is daily peak demand?
● How much testing environment is similar to production environment?
● Can you provide a breakdown of the frequency of certain activities?
(for example, 75% browse, 2% check their order status, and so on)
● Where is the project in terms of the overall project performance goals?
● ...
Questions.
8. What is a hit?
- HTTP request
- Whole page
- Entire visit by a given user
https://stocksnap.io/author/402 Skitter Photo
9. What is a day?
Determining the period of time
when most users arrive
on the system becomes
critical for estimating
peak load.
https://stocksnap.io/author/56 Sonja Langford
10. Throughput
- Transaction per unit of time
(Transaction pair - HTTP request and response)
- Page rate
- User rate
https://stocksnap.io/author/3350 Will Langenberg
14. 90% Line
90% Line is the value below which 90% of the samples fail.
https://stocksnap.io/author/9429 Raymond Sam
15. Median
Number which divides
the samples into two equal halves.
Half of the samples are
smaller than the median and
half are larger.
https://stocksnap.io/author/4440 Luis Llerena
16. Latency
Time between first request
is sent until first byte of response
reaches the client.
https://stocksnap.io/author/2784 Wil Stewart
19. Pick Load
Peak Load refers to the maximum
concurrent users within some
time period.
https://stocksnap.io/author/408 Fré Sonneveld
20. What is a user?
User is:
1. User is a hit.
2. User is all day visitor.
Once logged in for the whole day.
user = whole set of activities by the user for the whole
day.
May or may not be very active.
3. User visit.
visit = the most common usage of user
https://stocksnap.io/author/15749 Stephen Radford
25. Operation ceiling
Number of concurrent
users that the application
can withstand before becoming totally unresponsive
https://stocksnap.io/author/5300 Joseph Barrientos
28. Before you start
Develop goals and plan for obtaining the desired
measurements.
Develop realistic scenarios
https://stocksnap.io/author/1949 Startup Stock Photos
32. https://stocksnap.io/author/1949 Startup Stock Photos
Estimation - part 1.
- We anticipate 50,000 users a day?
- What is a user? User is a visit.
- What is a day? 8 hours
- Average user visit: 10 minutes
- Session timeout: 15 minutes
- Average pages per visit: 5
- Peak time factor: 5
- Requests per page: 6
33. https://stocksnap.io/author/1949 Startup Stock Photos
Estimation - part 2.
50,000 users per day / 8 hour day = … ~= 1.7 users/second
Peak hours: 1.7 users/second * 5 ~= 8.5 users/second
During visit: 8.5 users/second * 10 minutes ~= 5,100 users
5,100 users * 5 pages per visit = 25,500 pages per 10 minute visit
6 requests per page * (25,500 / 10) / 60 =
THROUGHPUT = 255 requests/second
43. - Generate reports after test run.
- Use CSV output rather than XML
- Use distributed (remote) testing
- Do not use XPath extractor
- Do not use Regular Expression Extractor with checked Body (unescaped)
- Use latest version of JMeter
- Use Cookie Manager for each Thread Group
- Read data from CSV files
- Use variables
- Use non-GUI mode
- …
- http://testerfenster.com/blog/jmeter-tutorials-best-practices/
https://stocksnap.io/author/1949 Startup Stock Photos
45. - Provide a warm-up period to initiate the environment
- Obtain measurements within a steady-state period
- Verify error-free test execution
- Drive same workload between runs
- Capture measurement without impacting performances
https://stocksnap.io/author/1949 Startup Stock Photos
49. Resources
Performance Testing Guidance for Web Applications Microsoft Corporation
Performance Testing with Jmeter - Second Edition Bayo Erinle
Performance Analysis for Java Web Sites Stacy Joines, Ruth Willenborg, Ken Hygh
https://blazemeter.com/blog/