• No results found

Continuous Performance Testing

N/A
N/A
Protected

Academic year: 2021

Share "Continuous Performance Testing"

Copied!
108
0
0

Loading.... (view fulltext now)

Full text

(1)

Continuous Performance Testing

Confoo.ca

Kore Nordmann (@koredn)

(2)

About me

I

Degree in computer sience

I

Professional PHP since 2000

I

Open source enthusiast

I

Passion for

I

Software Design

I

Automated Testing

(3)

About me

I

Degree in computer sience

I

Professional PHP since 2000

I

Open source enthusiast

I

Passion for

I

Software Design

I

Automated Testing

(4)

About me

I

Degree in computer sience

I

Professional PHP since 2000

I

Open source enthusiast

I

Passion for

I

Software Design

I

Automated Testing

(5)

About me

I

Degree in computer sience

I

Professional PHP since 2000

I

Open source enthusiast

I

Passion for

I

Software Design

I

Automated Testing

(6)

Co-founder of

Qafoo

passion for software quality

Helping people to create high quality web applications.

http://qafoo.com

I

Expert consulting

I

Individual training

Get a training on object oriented design for your team!

(7)

Co-founder of

Qafoo

passion for software quality

Helping people to create high quality web applications.

http://qafoo.com

I

Expert consulting

I

Individual training

(8)

Co-founder of

Qafoo

passion for software quality

Helping people to create high quality web applications.

http://qafoo.com

I

Expert consulting

I

Individual training

Get a training on object oriented design for your team!

(9)

Co-founder of

Qafoo

passion for software quality

Helping people to create high quality web applications.

http://qafoo.com

I

Expert consulting

I

Individual training

(10)

Outline

Motivation

Conclusion

(11)

Motivation

I

Why should we do performance tests?

I

Locate unknown bottlenecks

I

Mesaure behaviour of the full stack

I

Why should we do that continuously?

I

Find performance regressions

(12)

Motivation

I

Why should we do performance tests?

I

Locate unknown bottlenecks

I

Mesaure behaviour of the full stack

I

Why should we do that continuously?

I

Find performance regressions

I

Ensure optimizations are persistent

(13)

Motivation

I

Why should we do performance tests?

I

Locate unknown bottlenecks

I

Mesaure behaviour of the full stack

I

Why should we do that continuously?

I

Find performance regressions

(14)

Motivation

I

Why should we do performance tests?

I

Locate unknown bottlenecks

I

Mesaure behaviour of the full stack

I

Why should we do that continuously?

I

Find performance regressions

I

Ensure optimizations are persistent

(15)

Often used tools

I

Often misused tools

I

siege

I

ApacheBench (ab)

I

Testing for micro-optimizations

I

Evaluating Hello-World-examples of Frameworks

I

Useful tools, I won’t talk about

I

xDebug Profiling

I

xhProf

I

Database profiling tools

(16)

Often used tools

I

Often misused tools

I

siege

I

ApacheBench (ab)

I

Testing for micro-optimizations

I

Evaluating Hello-World-examples of Frameworks

I

Useful tools, I won’t talk about

I

xDebug Profiling

I

xhProf

I

Database profiling tools

I

System metrics (Graphite, . . . )

(17)

Often used tools

I

Often misused tools

I

siege

I

ApacheBench (ab)

I

Testing for micro-optimizations

I

Evaluating Hello-World-examples of Frameworks

I

Useful tools, I won’t talk about

I

xDebug Profiling

I

xhProf

I

Database profiling tools

(18)

Often used tools

I

Often misused tools

I

siege

I

ApacheBench (ab)

I

Testing for micro-optimizations

I

Evaluating Hello-World-examples of Frameworks

I

Useful tools, I won’t talk about

I

xDebug Profiling

I

xhProf

I

Database profiling tools

I

System metrics (Graphite, . . . )

(19)

Often used tools

I

Often misused tools

I

siege

I

ApacheBench (ab)

I

Testing for micro-optimizations

I

Evaluating Hello-World-examples of Frameworks

I

Useful tools, I won’t talk about

I

xDebug Profiling

I

xhProf

I

Database profiling tools

(20)

The problem is more complex

I

Your task: Create a new webshop

I

Assume it’s march

I

The deadline is October this year, right before Christmas

(21)

The problem is more complex

I

Your task: Create a new webshop

I

Assume it’s march

(22)

The problem is more complex

I

Your task: Create a new webshop

I

Assume it’s march

I

The deadline is October this year, right before Christmas

(23)

A webshop

0 articles 0.00 €

Awesome Shop

Smartphone

1337,-- € 5 items in stock

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Comments

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.

(24)

A webshop

2 articles 42.32 €

Awesome Shop

Smartphone

1337,-- € 5 items in stock

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Comments

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.

(25)

A webshop

2 articles 42.32 €

Awesome Shop

Smartphone

1337,-- € 5 items in stock

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Comments

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.

(26)

A webshop

2 articles 42.32 €

Awesome Shop

Smartphone

1337,-- € 5 items in stock

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Comments

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.

(27)

A webshop

2 articles 42.32 €

Awesome Shop

Smartphone

1337,-- € 5 items in stock

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Comments

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.

(28)

A real tool for performance tests

I

JMeter

I

Complex user paths

I

Concurrend requests

I

Record on proxy

I

Clustering

(29)

A real tool for performance tests

I

JMeter

I

Complex user paths

I

Concurrend requests

I

Record on proxy

(30)

A real tool for performance tests

I

JMeter

I

Complex user paths

I

Concurrend requests

I

Record on proxy

I

Clustering

(31)

A real tool for performance tests

I

JMeter

I

Complex user paths

I

Concurrend requests

I

Record on proxy

(32)

A real tool for performance tests

I

JMeter

I

Complex user paths

I

Concurrend requests

I

Record on proxy

I

Clustering

(33)

JMeter 101

I

Thread Group

I

An execution plan (like a user registration)

I

Controller

I

Controls how samplers are executed (loop, random, . . . )

I

Config Element

I

Configration, optionally from external sources

I

Timer

I

Defining timing constraints for sampler execution

I

Sampler

(34)

JMeter 101

I

Thread Group

I

An execution plan (like a user registration)

I

Controller

I

Controls how samplers are executed (loop, random, . . . )

I

Config Element

I

Configration, optionally from external sources

I

Timer

I

Defining timing constraints for sampler execution

I

Sampler

I

Perform the actual work (like HTTP requests)

(35)

JMeter 101

I

Thread Group

I

An execution plan (like a user registration)

I

Controller

I

Controls how samplers are executed (loop, random, . . . )

I

Config Element

I

Configration, optionally from external sources

I

Timer

I

Defining timing constraints for sampler execution

I

Sampler

(36)

JMeter 101

I

Thread Group

I

An execution plan (like a user registration)

I

Controller

I

Controls how samplers are executed (loop, random, . . . )

I

Config Element

I

Configration, optionally from external sources

I

Timer

I

Defining timing constraints for sampler execution

I

Sampler

I

Perform the actual work (like HTTP requests)

(37)

JMeter 101

I

Thread Group

I

An execution plan (like a user registration)

I

Controller

I

Controls how samplers are executed (loop, random, . . . )

I

Config Element

I

Configration, optionally from external sources

I

Timer

I

Defining timing constraints for sampler execution

I

Sampler

(38)

Getting started

I

Create a test plan

I

What do users actually do on your site?

I

Example:

I

Random browser

I

User registration

I

Sign on

I

Shopping with checkout

I

Commenting products

(39)

Getting started

I

Create a test plan

I

What do users actually do on your site?

I

Example:

I

Random browser

I

User registration

I

Sign on

I

Shopping with checkout

(40)

Using JMeter

Demo

(41)

Automation

I

Ant JMeter integration

I

Automation of your environment

I

Setting up different software versions

I

Testing with different extensions

I

Running different database setups

I

Handling multi-node environments

(42)

Automation

I

Ant JMeter integration

I

Automation of your environment

I

Setting up different software versions

I

Testing with different extensions

I

Running different database setups

I

Handling multi-node environments

I

Plain Ant or Puppet, Chef, Vagrant

(43)

Automation

I

Ant JMeter integration

I

Automation of your environment

I

Setting up different software versions

I

Testing with different extensions

I

Running different database setups

I

Handling multi-node environments

(44)

Automation

I

Ant JMeter integration

I

Automation of your environment

I

Setting up different software versions

I

Testing with different extensions

I

Running different database setups

I

Handling multi-node environments

I

Plain Ant or Puppet, Chef, Vagrant

(45)

Automation

I

Ant JMeter integration

I

Automation of your environment

I

Setting up different software versions

I

Testing with different extensions

I

Running different database setups

I

Handling multi-node environments

(46)

Automation

I

Ant JMeter integration

I

Automation of your environment

I

Setting up different software versions

I

Testing with different extensions

I

Running different database setups

I

Handling multi-node environments

I

Plain Ant or Puppet, Chef, Vagrant

(47)

Automation

I

Ant JMeter integration

I

Automation of your environment

I

Setting up different software versions

I

Testing with different extensions

I

Running different database setups

I

Handling multi-node environments

(48)

Apache Ant example

26 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache− f i l e ”

27 depends=” setup −apc−bytecode − f i l e −cache , − b u i l d ”

28 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and f i l e based cache . ” />

29

30 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache−apc ”

31 depends=” setup −apc−bytecode −apc−cache , − b u i l d ”

32 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and APC based cache . ” />

211 <t a r g e t name=”−remote−exec− p a r a l l e l ”> 212 <subant t a r g e t=” $ { t a r g e t } ” i n h e r i t a l l=” t r u e ”> 213 <f i l e s e t d i r=” $ { p r o j e c t . d i r } ” i n c l u d e s=” s e r v e r ∗ . xml ” /> 214 </subant> 215 </t a r g e t> 216 217 <t a r g e t name=”−remote−exec ”>

218 <sshexec command=” $ { command } ”

219 username=” $ { ssh . username } ”

220 password=” $ { ssh . password } ”

221 h o s t=” $ { hostname } ”

222 t r u s t=” t r u e ” />

223 </t a r g e t>

(49)

Apache Ant example

26 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache− f i l e ”

27 depends=” setup −apc−bytecode − f i l e −cache , − b u i l d ”

28 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and f i l e based cache . ” />

29

30 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache−apc ”

31 depends=” setup −apc−bytecode −apc−cache , − b u i l d ”

32 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and APC based cache . ” />

211 <t a r g e t name=”−remote−exec− p a r a l l e l ”> 212 <subant t a r g e t=” $ { t a r g e t } ” i n h e r i t a l l=” t r u e ”> 213 <f i l e s e t d i r=” $ { p r o j e c t . d i r } ” i n c l u d e s=” s e r v e r ∗ . xml ” /> 214 </subant> 215 </t a r g e t> 216 217 <t a r g e t name=”−remote−exec ”>

218 <sshexec command=” $ { command } ”

219 username=” $ { ssh . username } ”

220 password=” $ { ssh . password } ”

221 h o s t=” $ { hostname } ”

222 t r u s t=” t r u e ” />

(50)

Apache Ant example

26 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache− f i l e ”

27 depends=” setup −apc−bytecode − f i l e −cache , − b u i l d ”

28 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and f i l e based cache . ” />

29

30 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache−apc ”

31 depends=” setup −apc−bytecode −apc−cache , − b u i l d ”

32 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and APC based cache . ” />

211 <t a r g e t name=”−remote−exec− p a r a l l e l ”> 212 <subant t a r g e t=” $ { t a r g e t } ” i n h e r i t a l l=” t r u e ”> 213 <f i l e s e t d i r=” $ { p r o j e c t . d i r } ” i n c l u d e s=” s e r v e r ∗ . xml ” /> 214 </subant> 215 </t a r g e t> 216 217 <t a r g e t name=”−remote−exec ”>

218 <sshexec command=” $ { command } ”

219 username=” $ { ssh . username } ”

220 password=” $ { ssh . password } ”

221 h o s t=” $ { hostname } ”

222 t r u s t=” t r u e ” />

223 </t a r g e t>

(51)

Apache Ant example

26 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache− f i l e ”

27 depends=” setup −apc−bytecode − f i l e −cache , − b u i l d ”

28 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and f i l e based cache . ” />

29

30 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache−apc ”

31 depends=” setup −apc−bytecode −apc−cache , − b u i l d ”

32 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and APC based cache . ” />

211 <t a r g e t name=”−remote−exec− p a r a l l e l ”> 212 <subant t a r g e t=” $ { t a r g e t } ” i n h e r i t a l l=” t r u e ”> 213 <f i l e s e t d i r=” $ { p r o j e c t . d i r } ” i n c l u d e s=” s e r v e r ∗ . xml ” /> 214 </subant> 215 </t a r g e t> 216 217 <t a r g e t name=”−remote−exec ”>

218 <sshexec command=” $ { command } ”

219 username=” $ { ssh . username } ”

220 password=” $ { ssh . password } ”

221 h o s t=” $ { hostname } ”

222 t r u s t=” t r u e ” />

(52)

Apache Ant example

26 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache− f i l e ”

27 depends=” setup −apc−bytecode − f i l e −cache , − b u i l d ”

28 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and f i l e based cache . ” />

29

30 <t a r g e t name=” b u i l d −apc−bytecode −cache−user −cache−apc ”

31 depends=” setup −apc−bytecode −apc−cache , − b u i l d ”

32 d e s c r i p t i o n=”−> Run w i t h APC opcode cache and APC based cache . ” />

211 <t a r g e t name=”−remote−exec− p a r a l l e l ”> 212 <subant t a r g e t=” $ { t a r g e t } ” i n h e r i t a l l=” t r u e ”> 213 <f i l e s e t d i r=” $ { p r o j e c t . d i r } ” i n c l u d e s=” s e r v e r ∗ . xml ” /> 214 </subant> 215 </t a r g e t> 216 217 <t a r g e t name=”−remote−exec ”>

218 <sshexec command=” $ { command } ”

219 username=” $ { ssh . username } ”

220 password=” $ { ssh . password } ”

221 h o s t=” $ { hostname } ”

222 t r u s t=” t r u e ” />

223 </t a r g e t>

(53)

Apache Ant example

454 <t a r g e t name=”− r e s t a r t −h o s t ”>

455 <a n t c a l l t a r g e t=”−remote−exec ”>

456 <param name=” command ” v a l u e=” shutdown − r now ” />

457 </a n t c a l l>

458

459 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } t o s t o p . . . ” />

460 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

461 <not>

462 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

463 </not>

464 </w a i t f o r>

465

466 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } i s up ag ain . . . ” />

467 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

468 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

469 </w a i t f o r>

(54)

Apache Ant example

454 <t a r g e t name=”− r e s t a r t −h o s t ”>

455 <a n t c a l l t a r g e t=”−remote−exec ”>

456 <param name=” command ” v a l u e=” shutdown − r now ” />

457 </a n t c a l l>

458

459 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } t o s t o p . . . ” />

460 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

461 <not>

462 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

463 </not>

464 </w a i t f o r>

465

466 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } i s up ag ain . . . ” />

467 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

468 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

469 </w a i t f o r>

470 </t a r g e t>

(55)

Apache Ant example

454 <t a r g e t name=”− r e s t a r t −h o s t ”>

455 <a n t c a l l t a r g e t=”−remote−exec ”>

456 <param name=” command ” v a l u e=” shutdown − r now ” />

457 </a n t c a l l>

458

459 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } t o s t o p . . . ” />

460 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

461 <not>

462 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

463 </not>

464 </w a i t f o r>

465

466 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } i s up ag ain . . . ” />

467 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

468 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

469 </w a i t f o r>

(56)

Apache Ant example

454 <t a r g e t name=”− r e s t a r t −h o s t ”>

455 <a n t c a l l t a r g e t=”−remote−exec ”>

456 <param name=” command ” v a l u e=” shutdown − r now ” />

457 </a n t c a l l>

458

459 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } t o s t o p . . . ” />

460 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

461 <not>

462 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

463 </not>

464 </w a i t f o r>

465

466 <echo taskname=” w a i t f o r ” message=” Wait f o r $ { hostname } i s up ag ain . . . ” />

467 <w a i t f o r maxwait=” 5 ” m a x w a i t u n i t=” minute ” checkevery=” 100 ”>

468 <h t t p u r l=” h t t p : / / $ { hostname } ”/>

469 </w a i t f o r>

470 </t a r g e t>

(57)

Apache Ant example

421 <t a r g e t name=” j m e t e r ” depends=”− s e t t i n g s − i n i t , − s t a r t −j m e t e r ” /> 422 423 <t a r g e t name=”− s t a r t −j m e t e r ”> 424 <a n t c a l l t a r g e t=”− s t a r t −j m e t e r −b e f o r e −hook ” /> 425 426 <j m e t e r jmeterhome=” $ { l o c a l . j m e t e r . home . d i r } ” 427 r e s u l t l o g=” $ { l o c a l . j m e t e r . l o g . f i l e } ” 428 t e s t p l a n=” $ { l o c a l . j m e t e r . t e s t . d i r } / $ { j m e t e r . f i l e } ”> 429

430 <p r o p e r t y name=” j m e t e r . data . d i r ” v a l u e=” $ { l o c a l . p r o j e c t . data . d i r } ” />

431 <p r o p e r t y name=” j m e t e r . rampup . t i m e ” v a l u e=” $ { j m e t e r . rampup . t i m e } ” />

432 <p r o p e r t y name=” j m e t e r . e x e c u t i o n . t i m e ” v a l u e=” $ { j m e t e r . e x e c u t i o n . t i m e } ” />

433 </j m e t e r>

434

435 <a n t c a l l t a r g e t=”− s t a r t −j m e t e r − a f t e r −hook ” />

(58)

Apache Ant example

421 <t a r g e t name=” j m e t e r ” depends=”− s e t t i n g s − i n i t , − s t a r t −j m e t e r ” /> 422 423 <t a r g e t name=”− s t a r t −j m e t e r ”> 424 <a n t c a l l t a r g e t=”− s t a r t −j m e t e r −b e f o r e −hook ” /> 425 426 <j m e t e r jmeterhome=” $ { l o c a l . j m e t e r . home . d i r } ” 427 r e s u l t l o g=” $ { l o c a l . j m e t e r . l o g . f i l e } ” 428 t e s t p l a n=” $ { l o c a l . j m e t e r . t e s t . d i r } / $ { j m e t e r . f i l e } ”> 429

430 <p r o p e r t y name=” j m e t e r . data . d i r ” v a l u e=” $ { l o c a l . p r o j e c t . data . d i r } ” />

431 <p r o p e r t y name=” j m e t e r . rampup . t i m e ” v a l u e=” $ { j m e t e r . rampup . t i m e } ” />

432 <p r o p e r t y name=” j m e t e r . e x e c u t i o n . t i m e ” v a l u e=” $ { j m e t e r . e x e c u t i o n . t i m e } ” />

433 </j m e t e r>

434

435 <a n t c a l l t a r g e t=”− s t a r t −j m e t e r − a f t e r −hook ” />

436 </t a r g e t>

(59)

Apache Ant example

421 <t a r g e t name=” j m e t e r ” depends=”− s e t t i n g s − i n i t , − s t a r t −j m e t e r ” /> 422 423 <t a r g e t name=”− s t a r t −j m e t e r ”> 424 <a n t c a l l t a r g e t=”− s t a r t −j m e t e r −b e f o r e −hook ” /> 425 426 <j m e t e r jmeterhome=” $ { l o c a l . j m e t e r . home . d i r } ” 427 r e s u l t l o g=” $ { l o c a l . j m e t e r . l o g . f i l e } ” 428 t e s t p l a n=” $ { l o c a l . j m e t e r . t e s t . d i r } / $ { j m e t e r . f i l e } ”> 429

430 <p r o p e r t y name=” j m e t e r . data . d i r ” v a l u e=” $ { l o c a l . p r o j e c t . data . d i r } ” />

431 <p r o p e r t y name=” j m e t e r . rampup . t i m e ” v a l u e=” $ { j m e t e r . rampup . t i m e } ” />

432 <p r o p e r t y name=” j m e t e r . e x e c u t i o n . t i m e ” v a l u e=” $ { j m e t e r . e x e c u t i o n . t i m e } ” />

433 </j m e t e r>

434

435 <a n t c a l l t a r g e t=”− s t a r t −j m e t e r − a f t e r −hook ” />

(60)

Apache Ant example

351 <t a r g e t name=”−backup−data −from −h o s t ”>

352 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . e r r o r . l o g } ’ ”

353 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− e r r o r . l o g ”

354 t r u s t=” t r u e ” />

355

356 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . access . l o g } ’ ”

357 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− access . l o g ”

358 t r u s t=” t r u e ” />

359

360 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . php . e r r o r . l o g } ’ ”

361 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− p h p e r r o r s . l o g ”

362 t r u s t=” t r u e ” />

363

364 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . b a s e d i r } / s c r i p t s / l o a d . l o g ’ ”

365 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− l o a d . l o g ”

366 t r u s t=” t r u e ” />

367

368 </t a r g e t>

(61)

Apache Ant example

351 <t a r g e t name=”−backup−data −from −h o s t ”>

352 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . e r r o r . l o g } ’ ”

353 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− e r r o r . l o g ”

354 t r u s t=” t r u e ” />

355

356 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . access . l o g } ’ ”

357 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− access . l o g ”

358 t r u s t=” t r u e ” />

359

360 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . php . e r r o r . l o g } ’ ”

361 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− p h p e r r o r s . l o g ”

362 t r u s t=” t r u e ” />

363

364 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . b a s e d i r } / s c r i p t s / l o a d . l o g ’ ”

365 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− l o a d . l o g ”

366 t r u s t=” t r u e ” />

367

(62)

Apache Ant example

351 <t a r g e t name=”−backup−data −from −h o s t ”>

352 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . e r r o r . l o g } ’ ”

353 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− e r r o r . l o g ”

354 t r u s t=” t r u e ” />

355

356 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . access . l o g } ’ ”

357 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− access . l o g ”

358 t r u s t=” t r u e ” />

359

360 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . php . e r r o r . l o g } ’ ”

361 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− p h p e r r o r s . l o g ”

362 t r u s t=” t r u e ” />

363

364 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . b a s e d i r } / s c r i p t s / l o a d . l o g ’ ”

365 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− l o a d . l o g ”

366 t r u s t=” t r u e ” />

367

368 </t a r g e t>

(63)

Apache Ant example

351 <t a r g e t name=”−backup−data −from −h o s t ”>

352 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . e r r o r . l o g } ’ ”

353 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− e r r o r . l o g ”

354 t r u s t=” t r u e ” />

355

356 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . access . l o g } ’ ”

357 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− access . l o g ”

358 t r u s t=” t r u e ” />

359

360 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . php . e r r o r . l o g } ’ ”

361 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− p h p e r r o r s . l o g ”

362 t r u s t=” t r u e ” />

363

364 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . b a s e d i r } / s c r i p t s / l o a d . l o g ’ ”

365 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− l o a d . l o g ”

366 t r u s t=” t r u e ” />

367

(64)

Apache Ant example

351 <t a r g e t name=”−backup−data −from −h o s t ”>

352 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . e r r o r . l o g } ’ ”

353 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− e r r o r . l o g ”

354 t r u s t=” t r u e ” />

355

356 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . webserver . access . l o g } ’ ”

357 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− access . l o g ”

358 t r u s t=” t r u e ” />

359

360 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . php . e r r o r . l o g } ’ ”

361 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− p h p e r r o r s . l o g ”

362 t r u s t=” t r u e ” />

363

364 <scp r e m o t e f i l e=” $ { ssh . username } : $ { ssh . password }@${ hostname } : ’ $ { remote . b a s e d i r } / s c r i p t s / l o a d . l o g ’ ”

365 l o c a l t o f i l e=” $ { l o c a l . b u i l d d i r } / $ { hostname}− l o a d . l o g ”

366 t r u s t=” t r u e ” />

367

368 </t a r g e t>

(65)

Test Setup

(66)

Test Setup

jMeter

(67)

Test Setup

jMeter

(68)

Test Setup

jMeter

iftstat, iftop

Load Balancer

FrontEnd FrontEnd FrontEnd

Verify Sessions vmstat,

top

(69)

Test Setup

jMeter

iftstat, iftop

Load Balancer

FrontEnd FrontEnd FrontEnd

Verify Sessions vmstat, top Master Slave vmstat, top

(70)

Test Setup

jMeter

iftstat, iftop

Load Balancer

FrontEnd FrontEnd FrontEnd

Verify Sessions vmstat, top Master Slave vmstat, top Services

(71)

Test Setup

jMeter

iftstat, iftop

Load Balancer

FrontEnd FrontEnd FrontEnd

Verify Sessions vmstat, top Master Slave vmstat, top Services Response Times

Slow Query Log, …

Profiling, xhProf, … Response Times

(72)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

I

See vmstat, top

(73)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

(74)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

I

See vmstat, top

(75)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

(76)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

I

See vmstat, top

(77)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

(78)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

I

See vmstat, top

(79)

Hardware

I

Test in a realistic environment

I

If your software runs in the cloud test against virtual

environment

I

If you use real hardware, also test against real hardware

I

JMeter might have serious hardware requirements

I

Use real hardware

I

Use the biggest VM available

I

Ensure that not the JMeter hardware is the bottleneck

I

Be sure that the network is not the bottleneck

I

See ifstat, iftop

I

Measure several system metrics

I

See vmstat, top

(80)

Extended Statistics

Demo

(81)

Continuous Performance

I

Plugins available for:

I

Jenkins

I

Sonar

(82)

Continuous Performance

I

Plugins available for:

I

Jenkins

I

Sonar

I

Maintaining all those servers can be expensive

(83)
(84)

Questions

I

Common questions:

I

Can we survive christmas?

I

What is the maximum we can accomplish with the current

setup?

I

Does (APC|XCache|MemCache) really help us?

(85)

Questions

I

Common questions:

I

Can we survive christmas?

I

What is the maximum we can accomplish with the current

setup?

(86)

Questions

I

Common questions:

I

Can we survive christmas?

I

What is the maximum we can accomplish with the current

setup?

I

Does (APC|XCache|MemCache) really help us?

(87)

Getting realistic settings

I

Ask for real access logs:

I

Extract exact request model from those

I

Your customer usually only knows very broad values, like:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Very seldom, that you get more:

I

Ask for access statistics before Christmas and the ratio

compared with regular months

I

Ask for hours with the highest conversion rates

I

Maybe get the aggregated access logs from existing similar

shops

(88)

Getting realistic settings

I

Ask for real access logs:

I

Extract exact request model from those

I

Your customer usually only knows very broad values, like:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Very seldom, that you get more:

I

Ask for access statistics before Christmas and the ratio

compared with regular months

I

Ask for hours with the highest conversion rates

I

Maybe get the aggregated access logs from existing similar

shops

(89)

Getting realistic settings

I

Ask for real access logs:

I

Extract exact request model from those

I

Your customer usually only knows very broad values, like:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Very seldom, that you get more:

I

Ask for access statistics before Christmas and the ratio

compared with regular months

I

Ask for hours with the highest conversion rates

I

Maybe get the aggregated access logs from existing similar

shops

(90)

Getting realistic settings

I

Ask for real access logs:

I

Extract exact request model from those

I

Your customer usually only knows very broad values, like:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Very seldom, that you get more:

I

Ask for access statistics before Christmas and the ratio

compared with regular months

I

Ask for hours with the highest conversion rates

I

Maybe get the aggregated access logs from existing similar

shops

(91)

Getting realistic settings

I

Ask for real access logs:

I

Extract exact request model from those

I

Your customer usually only knows very broad values, like:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Very seldom, that you get more:

I

Ask for access statistics before Christmas and the ratio

compared with regular months

I

Ask for hours with the highest conversion rates

I

Maybe get the aggregated access logs from existing similar

shops

(92)

Getting realistic settings

I

Ask for real access logs:

I

Extract exact request model from those

I

Your customer usually only knows very broad values, like:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Very seldom, that you get more:

I

Ask for access statistics before Christmas and the ratio

compared with regular months

I

Ask for hours with the highest conversion rates

I

Maybe get the aggregated access logs from existing similar

shops

(93)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

(94)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

I

Fail gracefully

(95)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

(96)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

I

Fail gracefully

(97)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

(98)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

I

Fail gracefully

(99)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

(100)

Example calculation

I

Customer provided values, for a classic webshop:

I

1.000.000 PIs per month

I

30.000 sold articles per month

I

45.000 registrations per month

I

Per day: 1

.

000

.

000

/

26

=

38

.

500 (non-business)

I

Per hour: 38

.

500

/

12

=

3

.

200 (national shop)

I

Peak hour: 3

.

200

8

=

25

.

500 (18:00 to 19:00)

I

Per second: 25

.

500

/

3600

=

7PI

/

s

I

Add Christmas / Easter bonus

I

Add launch bonus

I

So . . . 50 PI/s should be safe?

I

Spare resources for scaling are always a business decision

I

Provide with trade-off: Costs vs. downtime / slowness

I

Fail gracefully

(101)

Verification

I

Do your requests actually model customer requirements?

I

Compare generated accesss logs with real access logs

I

Compare user registrations / checkouts per hour with

requested values

(102)

Outline

Motivation

Conclusion

(103)

Conclusion

I

Plan your test scenario

I

Use realisitic thresholds

I

Choose the right tool

(104)

Conclusion

I

Plan your test scenario

I

Use realisitic thresholds

I

Choose the right tool

with care

(105)

Conclusion

I

Plan your test scenario

I

Use realisitic thresholds

I

Choose the right tool

(106)

Conclusion

I

Plan your test scenario

I

Use realisitic thresholds

I

Choose the right tool

with care

(107)

Thanks for Listening

Rate this talk:

https://joind.in/7842

Stay in touch

I

Kore Nordmann

I

[email protected]

I

@koredn / @qafoo

Rent a web quality expert:

http://qafoo.com

(108)

Thanks for Listening

Rate this talk:

https://joind.in/7842

Stay in touch

I

Kore Nordmann

I

[email protected]

I

@koredn / @qafoo

Rent a web quality expert:

http://qafoo.com

References

Related documents

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vitae velit sed leo

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna Request Quote.. Quick

Lorem ipsum dolor sit amet, consectetur adipiscing elit.. Mauris tempor molestie velit

Personal and family backgrounds of Malaysian undergraduates at UPM, their levels of Facebook usage according to quantity and quality and also their levels of social capital

Akkor vetették papírra őket, amikor a kereszténység már kitúrta a skandináv isteneket, és néhány történet azért maradt ránk, mert felvetődött a jogos aggodalom, hogy

This division covers the mandatory requirements, specific prohibitions and non mandatory mandatory guidance for materials, design, fabrication, inspection and testing, markings

It also contains a context menu that allows you to first select a UI element from the browser’s currently displayed page and then select from a list of Selenium commands with

In addition, the visual inspection validity is also evaluated in our study by determining the gold standard.In general, since the effect of all of these 12 items studied in this