Effective performance evaluation as part of a CI approach - Mission Impossible?

38
Effective performance evaluation as part of a CI approach Andy Still, Technical Director & Founder, Intechnica Mark Smith, Online QA Manager, Channel 4 Mission Impossible

description

A presentation on Continuous Performance Testing. Performance in CI: Background and challenges - Andy Still, Co-Founder, Intechnica An example implementation: Mark Smith, Online QA Manager, Channel 4

Transcript of Effective performance evaluation as part of a CI approach - Mission Impossible?

Page 1: Effective performance evaluation as part of a CI approach - Mission Impossible?

Effective performance evaluation as part of a CI approach

Andy Still, Technical Director & Founder, Intechnica

Mark Smith, Online QA Manager, Channel 4

Mission Impossible

Page 2: Effective performance evaluation as part of a CI approach - Mission Impossible?

Agenda

Performance in CI: Background and challenges Andy Still

An example implementation Mark Smith

Page 3: Effective performance evaluation as part of a CI approach - Mission Impossible?

Intechnica: Introduction

Specialists in IT application performance Vendor independent

Promote performance by design Enable performance best practice

Digital performance experts

Page 4: Effective performance evaluation as part of a CI approach - Mission Impossible?

Background

Performance in a modern development process?

Page 5: Effective performance evaluation as part of a CI approach - Mission Impossible?

Relative importance of Performance Control

Software lifecycle timeline

Performance with Agile

Page 6: Effective performance evaluation as part of a CI approach - Mission Impossible?

Background

What is CI?

Page 7: Effective performance evaluation as part of a CI approach - Mission Impossible?

If you are going to fail….. Fail Early and Fail Often

Key features Automated process,

run as often as possible

Validate as many things as possible• Pull

dependencies• Build• Unit tests• Syntax checks• Automation tests• Integration tests• ??Performance??• Deployment

What is Continuous Integration?

Page 8: Effective performance evaluation as part of a CI approach - Mission Impossible?

Should ….. Can we build performance into our CI

Process?

Page 9: Effective performance evaluation as part of a CI approach - Mission Impossible?

YES!!!

Page 10: Effective performance evaluation as part of a CI approach - Mission Impossible?

Why?

Performance is a first class citizen• As important as functional issues• Harder to fix – can be architectural changes

The earlier you know about problems the better.

If something is hard to do…. Do it early and do it often!

Page 11: Effective performance evaluation as part of a CI approach - Mission Impossible?

But….

Don’t be over ambitious• Test at a level appropriate to stage of development /

environment

Avoid false positives• Set realistic pass / fail settings• Tests have to run headless – can’t require any human

interpretation

Remember - performance is linear not binary• The checkin that broke the build may not be the one that

caused the problem.

Page 12: Effective performance evaluation as part of a CI approach - Mission Impossible?

Types of performance testing in CI

Page 13: Effective performance evaluation as part of a CI approach - Mission Impossible?

Types of tests that could be used

Micro benchmarking• Set KPIs against specific unit tests / integration tests• Need to consider

• Datasets v mocking• Environments• 3rd party integrations

Client side • Set KPIs for areas such as page weight etc.

Full test under load• Deploy to realistic environments / datasets

Page 14: Effective performance evaluation as part of a CI approach - Mission Impossible?

Fitting Performance into CI

Shortening the feedback loop

Page 15: Effective performance evaluation as part of a CI approach - Mission Impossible?

Performance and CI – Development - APM

Page 16: Effective performance evaluation as part of a CI approach - Mission Impossible?

Performance and CI - Deployment and CI Testing

Page 17: Effective performance evaluation as part of a CI approach - Mission Impossible?

Debate

What are the real challenges to successful implementation of performance controls within CI:

Process vs. Tooling

Page 18: Effective performance evaluation as part of a CI approach - Mission Impossible?

Challenges to successful delivery of performance controls within CI

Where do we start? Because performance is not binary people struggle to know how to

baseline and how to test. No frameworks currently exist to guide in the approach. Performance testing is always done at the end – right? Tests are brittle if delivered at the UI layer. How can you script and set KPIs against functionality that is not

yet completed.

Process is the inhibiting factor

Page 19: Effective performance evaluation as part of a CI approach - Mission Impossible?

Challenges to successful delivery of performance controls within CI

CI cannot be delivered effectively without tooling however… The integration of tooling and process is frequently seen as a

blocker to successful implementation.• Nothing available off the shelf that provides an integrated CI

capability• Generally requires bespoke integration approach based on

available API’s

Tooling should:• Empower developers to performance test• Automate deployment and performance testing of code drops• Provide automation of APM analysis• Automate benchmark comparison and reporting , Pass or Fail?

Tooling

Page 20: Effective performance evaluation as part of a CI approach - Mission Impossible?

Web: www.intechnica.co.ukEmail: [email protected]: @andy_still / @intechnicaBlog:

http://internetperformanceexpert.wordpress.comTel: 0845 680 9679Address: Fourways House, 57 Hilton Street, Manchester,

M1 2EJ

Andy StillTechnical Director & Co-founder - Intechnica

Questions…..

Then over to Mark to see how they are solving these problems at Channel 4

Page 21: Effective performance evaluation as part of a CI approach - Mission Impossible?

Mark Smith

25 years experience in IT development and testing

Online QA Manager at Channel 4• BDD and ATDD automation framework

QA Manager at Asos• Full scale implementation of automated functional testing

Fair Isaac• Pioneered automated testing with reusable keyword driven

frameworks• Built web service testing framework using VUGen and Excel

macros Razorfish

• Early exposure to Web development and eCommerce

Introduction

Page 22: Effective performance evaluation as part of a CI approach - Mission Impossible?

Performance at least as important as functionality on many sites

Performance breakages can be more challenging to fix than functional ones

Build failures and short feedback loops can prevent these breakages making it into the code base

Why Continuous performance testing?

Page 23: Effective performance evaluation as part of a CI approach - Mission Impossible?

• May be too disruptive during early stages of a project

• Might meet resistance to the concept of failing builds for non-functional reasons

• But on stable projects early identification of performance issues can only be of benefit

• So yes, you do, and as soon as is practical

But Do I also want pure CI performance testing?

Page 24: Effective performance evaluation as part of a CI approach - Mission Impossible?

Challenges

• Each project needs own instance of tooling

• License costs high if using enterprise tools

• Technically more challenging if using open source tools

Page 25: Effective performance evaluation as part of a CI approach - Mission Impossible?

Continuous Integration Testing

Requirements Integration with CI tool Ability to fail build on

percentile response time, error rates and other metrics at transaction level

Front end instrumentation Post run data collation

Page 26: Effective performance evaluation as part of a CI approach - Mission Impossible?

Full Volume Testing also needs:

Integration with CI tool Ability to fail build on percentile response time, error

rates and other metrics at transaction level Front end instrumentation Post run data collation Scalability to enterprise loads Viable injection infrastructure Real time monitoring of back end

Page 27: Effective performance evaluation as part of a CI approach - Mission Impossible?

Selected Tools

Channel 4 chose the open source route• Jenkins

– CI build management• Jmeter

– Load Testing• webPageTest

– Front End Instrumentation

Page 28: Effective performance evaluation as part of a CI approach - Mission Impossible?

Front end instrumentation

webPageTest can run full workflows during load tests used to monitor metrics such as:

Time to first byte DOM Content Ready End Load Event End time Doc Complete Time (ms) Fully loaded Time to title Bytes in (Doc) Num requests (fully loaded)

Page 29: Effective performance evaluation as part of a CI approach - Mission Impossible?

Jenkins controls the process

Page 30: Effective performance evaluation as part of a CI approach - Mission Impossible?

Jenkins calls JMeter…

Page 31: Effective performance evaluation as part of a CI approach - Mission Impossible?

which in turn calls webPageTest…

Page 32: Effective performance evaluation as part of a CI approach - Mission Impossible?

and results analysed using ’raw page data’ link from previous page

Page 33: Effective performance evaluation as part of a CI approach - Mission Impossible?

Can measure time to first byte, document complete and fully loaded time…

Page 34: Effective performance evaluation as part of a CI approach - Mission Impossible?

and also more specific metrics, such as cached and uncached page responses

Page 35: Effective performance evaluation as part of a CI approach - Mission Impossible?

Details output to Jenkins project workspace, with links to the full reports

Page 36: Effective performance evaluation as part of a CI approach - Mission Impossible?

Benefits of using webPageTest with JMeter:

Final results analysis aimed at CI build pass/fail. Results can trigger build failure for example.

Immediately raises awareness in the team for front end performance issues. The builds break until the front end hits its targets.

Graphical representation of browser cached and uncached performance, build by build

Click through from Jenkins workspace to log of test run results, step by step

Click through to detailed xml data from webPageTest Click through to detailed test analysis presented in webPageTest

front end, including Google page speed like analysis for example. Highly configurable test runs, using webPageTest scripting engine to

suit many and varied projects Ability to set up CI to test in different browsers Ability to set up different CI test scenarios, using webPageTest

scripts. For example testing with / without 3rd party content Ability to set up CI front end testing on different client hardware.

Perhaps best case / worst case.

Page 37: Effective performance evaluation as part of a CI approach - Mission Impossible?

So what do we get?

CI testing gives us Very short feedback loops Ability to fail build by many metrics

code base protected from performance degradations Performance trending dataIterative full volume testing adds Early and regular view of real world performance

Page 38: Effective performance evaluation as part of a CI approach - Mission Impossible?

Credits

Oliver Lloyd – www.github.com/oliverlloyd/jmeter-ec2 JMeter on EC2 Setup Script

Nick Godfrey - webwob.com Jenkins Integration webPageTest Integration