performance testing principles

16
S Performance Tests Principles Author Dariusz Kozon

Upload: dariusz-kozon

Post on 21-Aug-2015

66 views

Category:

Software


0 download

TRANSCRIPT

S

Performance Tests Principles

Author Dariusz Kozon

What is performance testing?

Following Wikipedia:

”performance testing is in general testing, performed to determine how a system performs in terms of responsiveness and stability under a particular workload. It can also serve to investigate, measure, validate or verify other quality attributes of the system, such as scalability, reliability and resource usage

Test vs Testing Envs

Test environment Testing environment

Application server and DB server

Testing application (for instance JMeter)

Application itself Testing computers (and threads)

Network on servers side Network on site testing infrascructure

Static files services Sniffers (like Fiddler)

Profilers

Test specification and requirements

Load Test

Key questions: Can we get expected load on level XYZ users in time of DD:HH:MM? How big are standard response times?

What we can find there: Confirm intended specification are being met Check critical scenarios Chcekc expected number of users and find ut standard

system behaviour under estimated load Find out response times and compare with requirements

and\or market and\or techincal standards Find out bottlenecks in application and DB Servers

Stress Test

Key questions: How is system’s robustness under extreme load? How system fails?

What we can find there: Find out upper capacity of load (for

application and DB) Find out system stability and breaking points Find out safe usage limit (f.eg. point for

finding additional resources in cloud)

Soak / Endurance tests

Key question: How system will perform after couple hours / days / weeks / longer period of time?

What we can find there: Memory leaks DB Cache warming up Decrease response times under rising time of

execution load

Spike tests

Key question: How system fails and restore itself?

What we can find: Behaviour after extreme load in short time

Other various scenarios

Testing and find proper configuration of environment

Scalability tests

Big number of low users

Low number of heavy users

Remember

It would be great if tests are: Realistic (to business KPI) Scalable and parameterized

HTTP/S testing != front end rendering time

Possible bottlenecks

Test environment Testing environment

Memory and CPU usage on APP server

Memory and CPU usage on computer

Memory and CPU usage on BD server

Possible threads to use on computer

Network Network

Simulating testing from other geo loactions

Load balancer

For wide picture we need to remember: First test particular nodes of server Next when particular nodes are OK, test entire

environment using Load balancer Test some configurations of load balancer to

find best one (especially in case of different resources on nodes)

Do we need cache? <tricky>

Answer is Yes. Why?

On production cache will be turn on Don’t forget about queries which are the same and don’t

change in time of work. Part of the performance tests should be time when cache is

warming up.

Why this question is valid? Why anyone would switch this off? Test data are very crucial from perspective of cache More test data = more reliable tests There could be situation when you are testing cache instead of real DB

Analyse

What we need to analyse performance results: Results from performance tool Results from profiler on side of server (execution of

particular methods) Status of CPU and Memory usage in time on db and

app servers Know bottlenecks Know what we exactly tested (load balancer, entire

server? nodes?, exclude bottlenecks)

Tools

How much it cost?

It always depends but according to environment (and scale to real production environment), how system is big and how much time it will get, time spent on analyse of results – it preety always one of the most coslty types of tests accross projects.

Thanks for attending!

If you have any questions feel free to ask me

[email protected]

or [email protected]