agile performance testing performance testing.pdf · agile performance testing cesario ramos...

33
© AgiliX Agile Development Consulting Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile Development Consulting

Upload: others

Post on 14-Jul-2020

21 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Agile Performance Testing

Cesario RamosIndependent ConsultantAgiliX Agile Development Consulting

Page 2: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Overview

• Why Agile performance testing?• Nature of performance testing• Agile performance testing

Page 3: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Why Agile Performance Testing?

Page 4: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

We experience

Primary problems after project release are NOT system crashes or incorrect system

responses

Primary problems are1. Responsiveness degradation2. Inability to handle required throughput

Source: Weyuker E.

Page 5: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Webshop for phones• Worked good during testing

• In production system failed after 15 minutes– Authentication server load was not

taken into account

Page 6: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

We know

Page 7: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Delay

Hand-offs

Task Switching

Defects

InventoryRelearning

We see

Page 8: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

We use

Page 9: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

We expect?

• To decrease overall lead-time–Throughput accounting v.s. Cost

accounting• To have less problems in production

• Decrease risk, increase reliability• To achieve overall better quality

• Usability, Stability, Performance

Page 10: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Still we see mostlyPre-production validation only!

Page 11: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

WHY?

Page 12: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

WHY?

• Performance test team is expensive, overworked– We can only test the complete system– Performance testing against a moving target– What happens to my baselines during sprints?– “First make it work, then make it fast”

• Deployment team is expensive, overworked– Deploying to test environment is very difficult and time

consuming– The fewer deployments the better

Page 13: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

WHY?

• “premature optimization is waste!”• Separate teams– Developers, Testers, Deployers, Analysts

• Costs are high for frequent deployment• Production like environments are expensive• We need specialists for performance• …

Page 14: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

What could we do?

Page 15: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Page 16: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Page 17: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Performance tests executed throughout the project

Page 18: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Performance activities, refined and executed in collaboration.

Page 19: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

What’s in it for you?

• Project manager– Improved quality.– Decreased risk.

• Developer– Will have effective discussions with

requirement engineers and performance testers.

• Tester– Not waste any time on trivial problems.– Help the team earlier and more efficiently.

Page 20: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Nature of performance testing

Page 21: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Grey box testing • You must understand how it works in

order to write relevant test scripts.• You must understand the architecture.

Page 22: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Beware of

Integration pointsChain reactionsBlocked threadsUnbalanced capacities

No more simple record playback

Source: Nygard M.

Page 23: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Build stub components• Simulate SLA's

• Test against the stubs• Create failure modes

–Slow network responses–Huge data responses

Page 24: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Correlation problem Per server– Thread pools– Connection

pools– Request

Response times– CPU usage– Memory usage– JVM behavior– Code hotspots

Page 25: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Tuning

Who dominates the CPU?– Operating system? (OS system load on CPU)– JVM? (object lifecycle, garbage collection)– Application? (algorithms)– None (blocked threads most of the time)

There’s always one most prominent performance problem

All performance problems express themselves in the hardware

Source: Kirk Pepperdine

Page 26: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Agile performance testing

Page 27: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

• Feature driven planning is needed– Build a release plan where you

performance test every few sprints, when couple of related features are done!

• Need for establishing Baselines– Deployed and production– Useful when architecture stabilizes

Page 28: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

• Invest in automatic– Deployment– Smoke tests– Integration testing

Page 29: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Exploratory performance testing

• Local performance tests– Memory leaks– Memory usage patterns– Threading issues

• Code Reviews• Checks on use of boundedness, use of

timeouts• Use of caching, cache configuration• Best practices on algorithms, synchronization,

designs, value objects, functional programming, modularization, …

Page 30: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

• Deployed performance tests– Workload issues

• #clients, request frequency, arrival rate, duration

– Configuration• Thread pool sizes, Connection pool sizes, Cache

sizes, JVM configuration, queue sizes, …

– Application• Replication, remote methods calls, database

interactions, asynchronous messages, security service, …

Page 31: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

When a performance problems is found

1. write a failing test for it2. make it work local3. make it work on the deployed

environments

Page 32: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Summarizing

Performance testing is agile and iterative by nature!

Grey box testingAvoid re-runsAutomatic deploymentNeed to correlate various measurement resultsEstablish baselines

Page 33: Agile Performance Testing Performance Testing.pdf · Agile Performance Testing Cesario Ramos Independent Consultant AgiliX Agile DevelopmentConsulting cesario@agilix.nl. Title: Slide

© AgiliX Agile Development Consulting

Agile Performance Testing

Cesario RamosIndependent ConsultantAgiliX Agile DevelopmentConsulting

[email protected]