570 likes | 1.46k Views
Top ten secret weapons for performance testing in an agile environment
E N D
Top ten secret weapons for performance testing in an agile environment patrick.kua@thoughtworks.com (and alistair.jones@thoughtworks.com) © ThoughtWorks 2011
1 Make Performance Explicit © ThoughtWorks 2011
So that I can make better investment decisions As an investor I want to see the value of my portfolio presented on a single web page must have “good” performance, less than 0.2s page load for about 10,000 concurrent users © ThoughtWorks 2011
So that investors have a high-quality experience as the business grows As the Operations Manager I want the portfolio value page to render within 0.2s when 10,000 users are logged in © ThoughtWorks 2011
2 One Team © ThoughtWorks 2011
Team Dynamics © ThoughtWorks 2011
Performance Testers Part of Team © ThoughtWorks 2011
Performance Testers Part of Team © ThoughtWorks 2011
Pair on Performance Test Stories © ThoughtWorks 2011
Rotate Pairs © ThoughtWorks 2011
3 Customer Driven © ThoughtWorks 2011
What was a good source of requirements? © ThoughtWorks 2011
Existing Pain Points © ThoughtWorks 2011
An example... © ThoughtWorks 2011
So that we can budget for future hardware needs as we grow As the data centre manager I want to know how much traffic we can handle now © ThoughtWorks 2011
Another example © ThoughtWorks 2011
So that we have confidence in meeting our SLA As the Operations Manager I want to ensure that a sustained peak load does not take out our service © ThoughtWorks 2011
Personas © ThoughtWorks 2011
Investors Marketing End Users Who is the customer? Power Users Operations © ThoughtWorks 2011
4 Discipline © ThoughtWorks 2011
Observe test results What do you see? Formulate an hypothesis Why is it doing that? Design an experiment How can I prove that’s what’s happening? Run the experiment Take the time to gather the evidence. Is the hypothesis valid? Change the application code Safe in the knowledge that I’m making it faster © ThoughtWorks 2011
?????????? © ThoughtWorks 2011
Observe test results Saw tooth pattern (1 minute intervals) Formulate an hypothesis Directory structure of (yyyy/mm/minuteofday)?. Slow down due to # of files in directory? Design an experiment 1 directory should result in even worse performance... Run the experiment We ran the test… Is the hypothesis valid? Change the application code © ThoughtWorks 2011
One Directory © ThoughtWorks 2011
5 Play Performance Early © ThoughtWorks 2011
End Start Other projects start performance testing here End Start Agile projects start performance testing as early as possible © ThoughtWorks 2011
6 Iterate Don’t (Just) Increment © ThoughtWorks 2011
We Sashimi © ThoughtWorks 2011
Sashimi Slice By... Presentation © ThoughtWorks 2011
So that I can better see trends in performance As the Operations Manager I want a graph of requests per second © ThoughtWorks 2011
So that I can better see trends in performance As the Operations Manager I want a graph of average latency per second © ThoughtWorks 2011
So that I can easily scan results at a single glance As the Operations Manager I want a one page showing all results © ThoughtWorks 2011
Sashimi Slice By... Scenario © ThoughtWorks 2011
So that we never have a day like “October 10” As the Operations Manager I want to ensure that a sustained peak load does not take out our service © ThoughtWorks 2011
So that we never have a day like “November 12” As the Operations Manager I want to ensure that an escalating load up to xxx requests/second does not take out our service © ThoughtWorks 2011
7 Automate, Automate, Automate © ThoughtWorks 2011
Automated Compilation Automated Tests Automated Packaging Automated Deployment © ThoughtWorks 2011
Why Automation? Automation => Reproducible and Consistent Automation => Faster Feedback Automation => Higher Productivity © ThoughtWorks 2011
Automated Test Orchestration Automated Analysis Automated Scheduling Automated Load Generation Automated Application Deployment Automated Result Archiving © ThoughtWorks 2011
8 Continuous Performance Testing © ThoughtWorks 2011
Build Pipelines Application Performance © ThoughtWorks 2011
9 Test Drive Your Performance Test Code © ThoughtWorks 2011
V Model Testing Slower + Longer Performance Testing Speed Fast http://en.wikipedia.org/wiki/V-Model_(software_development) © ThoughtWorks 2011
We make mistakes © ThoughtWorks 2011
V Model Testing Slower + Longer Performance Testing Speed Unit test performance code to fail faster Fast http://en.wikipedia.org/wiki/V-Model_(software_development) © ThoughtWorks 2011
Fast feedback! Fail Fast! Faster learning Faster results © ThoughtWorks 2011