web performance testing with ci/cd
TRANSCRIPT
Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
Performance testing in CICDPrevent performance regression
Marcel VerkerkPablo Velasquez
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.2Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
AGENDA1.The Concept (fancy diagrams)
2.The Demo (moving screens)
3.The Latest …
Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved. 3
The ConceptValidating page performance PRIOR to deployments
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.4Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
What were we trying to solve?
4
new release
. . . . . . . . . . .
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.5Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
What were we trying to solve?
5
Typical application life cycle
?
UItest
Code
DeployMonitor
Proactive application life cycle
FIX!!
Deploy
UI test
Perf
Code
Monitor
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.6Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
Perf Metrics - Navigation TimingPart of W3C performance API!! Build into the browser!
onload event
https://www.w3.org/TR/navigation-timing-2/
click/url
page load time (plt)
performance.
timing
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.7Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
Perf Metrics – User TimingPerformance timing of ‘soft navigations’
7
performance.measure(‘name’, start, stop)
performance.mark() performance.mark()
performance.
mark()
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.8Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
JavaScript module
What did we come up with?Hook into the browser during UI testing and assert!
Browser
DEV/TESTFramework(Selenium)
assert
SLA
actual performance
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.9Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
JavaScript module
What did we come up with?Hook into the browser during UI testing and assert against RUM baseline
Browser
DEV/TESTFramework(Selenium)
RUM data!
Hadoop
RUM
ELK
assert
SLA
?
CICD
Baseline
actual performance
Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved. 10
The DemoWatch Pablo do his thing
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.11Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
The dashboardUsing ELK stack
11
Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved. 12
The Latest …what if you don’t run Selenium-JS?
CONFIDENTIAL. COPYRIGHT © 2016 GODADDY INC. ALL RIGHTS RESERVED.13Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved.
Run the thing as a WebService!Great solution for all teams!
13
Copyright© 2016 GoDaddy Inc. · 14455 N. Hayden Road Scottsdale, Arizona 85260 (480) 505-8800 · All Rights Reserved. 14
Q&A