SlideShare a Scribd company logo
1 of 14
DRAFT
Lessons learned on end to end testing from
Matt Barbour
Sr. Director Engineering
Comcast Silicon Valley
matt_barbour@cable.comcast.com
STAREAST 2016 – May 4th, 2016
Confidential and Proprietary
What can we LEARN from a
ZOMBIE MOVIE?
• Characters in zombieland
live by a set of rules in order
to survive the chaos
• Many of these apply in non-
zombie situations too!
Specifically:
End-to-end testing in real
world chaos.
FOL 2014 Process Improvement Project – IDD Process1
Confidential and Proprietary
Confidential and Proprietary
End To End Testing as compared to distributed computing
• Distributed systems expect failure
because the real-world is chaotic
• Strive to be fault tolerant by
optimizing for desired
characteristics of the end
application according to the CAP
Theorum
2
• End to end automated tests should
have similar expectations about the
environment they are operating in
Automated
Tests
Performant
Meaningful
Repeatable
Accurate
PARM THEORY
Tests must balance being:
Performant, Accurate, Repeatable, and Meaningful
Confidential and Proprietary
KNOW YOUR WAY OUT
BE FORWARD LOOKING AND
OWN THE PROBLEM!!
• Aim for excellence – don’t
tolerate mediocrity
• “that’s the way we have
always done it”™
• Low pass rate
• Tests cant finish quickly enough to
give feedback on a checkin
• Don’t know what a test is doing or
why it exists
• Inconsistent results
• Aim for being in the center of the
PARM matrix
3
Automa
ted
Tests
P
M
R
A
Confidential and Proprietary
BUDDY SYSTEM
LEARN AND APPLY DEVELOPMENT BEST
PRACTICES
Developing E2E tests should be no different than developing an application
GTAC 20154
• Design Patterns
• Code Review
• Unit Tests
• Static Code Analysis
Automat
ed
Tests
P
M
R
A
Confidential and Proprietary
RULE #31
CHECK THE BACK SEAT
MAKE SURE YOURE NOT BRINGING ALONG UNWANTED DEPENDENCIES
• Use a dependency management tool!
• Explicitly declare all dependencies
• Beware of depending on uber jars in a project…
5
Automat
ed
Tests
P
M
R
A
Confidential and Proprietary
A.B.T.  ALWAYS BE TESTING
Trim the fat
Look for opportunities to
obtain useful test metrics
outside of a traditional test
Even idle devices can tell you
something!
6
Automat
ed
Tests
P
M
R
A
Confidential and Proprietary
MAKE SURE YOUR TEST TOOLS
SCALE
• Use a test framework
which allow you to scale
in both directions
(more devices in parallel)
(more tests in parallel)
• Use open source tools
where possible
• WebDriver isnt just for
web and mobile!!
7
Automat
ed
Tests
P
M
R
A
Confidential and Proprietary
TRYING TO DO TOO MUCH IN A
TEST IS A RECIPE FOR FAILURE!
• Tests should focus on one
thing, and one thing only.
• BDD is helpful here
• BDD scenarios should favor
DAMP over DRY
• DAMP = Descriptive and
Meaningful Phrases
• DRY = Don’t repeat
yourself
8
Automated
Tests
P
M
R
A
Confidential and Proprietary
Choose your test methodologies
wisely
• You can lose the war against
unreliable, slow tests before you even
start by your choice of test
methodology
• Known offenders
– Image Comparison
– Xpath
– Record/Playback
– Not controlling your data
– The list goes on and on
9
RULE #7
TRAVEL LIGHT
Automated
Tests
P
M
R
A
Confidential and Proprietary
RULE #5
NO
ATTACHMENTS
CONTROL ALL THE DATA
IN YOUR SYSTEM
• If you have a data dependent test where you are not controlling the data you
probably have an unstable test, or worse…
• Mocking production data is time consuming… so is triaging false failures
• Tests must be able to start from a known state
1
0
Automated
Tests
P
M
R
A
Confidential and Proprietary
WORK AROUND OR ELIMINATE ARCHITECTURAL CONGESTION
11
•Shared resources are the enemy of test
parallelism.
•Your system’s architecture can get in the
way here… don’t assume the application
is infallible. Either work with it or modify
it
•Cloud deployments can mitigate
architectural problems
•VMs are cheap and easy to spin up and
tear down
Automated
Tests
P
M
R
A
Confidential and Proprietary
Avoid Strangers
This one is just plain wrong
• The only way we can survive the slow unreliable test zombie apocalypse is by sharing
tools and techniques.
12
All the test tools used by Comcast
Silicon Valley are open-sourced:
https://github.com/Comcast
• Cucumber testing in parallel
• Zucchini
• Device Management
• DAWG
• Selenium Driver Management
• Magic Wand
• Theres a great deal of knowledge
in the community out there, use
it!!
DRAFT
THANK YOU!!

More Related Content

What's hot

BigML Release: OptiML
BigML Release: OptiMLBigML Release: OptiML
BigML Release: OptiMLBigML, Inc
 
How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)Asier Barrenetxea
 
АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...
АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...
АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...GoQA
 
Test automation – the bitter truth
Test automation – the bitter truthTest automation – the bitter truth
Test automation – the bitter truthViktor Slavchev
 
ChefConf2014 - Chef TDD
ChefConf2014 - Chef TDD ChefConf2014 - Chef TDD
ChefConf2014 - Chef TDD Daniel Tracy
 
TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)Danny Preussler
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestShawn Jones
 
BigML Release: Fusions
BigML Release: FusionsBigML Release: Fusions
BigML Release: FusionsBigML, Inc
 
Mt s3 methodoligies&principles
Mt s3 methodoligies&principlesMt s3 methodoligies&principles
Mt s3 methodoligies&principlesTestingGeeks
 
Software Testing As a Career Path
Software Testing As a Career PathSoftware Testing As a Career Path
Software Testing As a Career PathRock Interview
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review ProcessDr. Syed Hassan Amin
 
Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"Viktor Slavchev
 
My journey as a developer
My journey as a developerMy journey as a developer
My journey as a developerMehdi Khalili
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentKristine Hejna
 
Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and WhenPaul Gower
 

What's hot (20)

Bug Advocacy
Bug AdvocacyBug Advocacy
Bug Advocacy
 
BigML Release: OptiML
BigML Release: OptiMLBigML Release: OptiML
BigML Release: OptiML
 
How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)
 
АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...
АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...
АННА ТИМОФІЄВА & СЕРГІЙ МАЛИНОВСЬКИЙ «Tools and Tips of video connection test...
 
Test automation – the bitter truth
Test automation – the bitter truthTest automation – the bitter truth
Test automation – the bitter truth
 
ChefConf2014 - Chef TDD
ChefConf2014 - Chef TDD ChefConf2014 - Chef TDD
ChefConf2014 - Chef TDD
 
TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonest
 
BigML Release: Fusions
BigML Release: FusionsBigML Release: Fusions
BigML Release: Fusions
 
Mt s3 methodoligies&principles
Mt s3 methodoligies&principlesMt s3 methodoligies&principles
Mt s3 methodoligies&principles
 
Presentation delex
Presentation delexPresentation delex
Presentation delex
 
Software Testing As a Career Path
Software Testing As a Career PathSoftware Testing As a Career Path
Software Testing As a Career Path
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review Process
 
Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"
 
My journey as a developer
My journey as a developerMy journey as a developer
My journey as a developer
 
Deployments in one click!
Deployments in one click!Deployments in one click!
Deployments in one click!
 
Testing in production
Testing in productionTesting in production
Testing in production
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability Assessment
 
Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and When
 
While You Are Coding
While You Are CodingWhile You Are Coding
While You Are Coding
 

Similar to Lessons Learned in Test Automation From Zombieland

Agile Software Testing the Agilogy Way
Agile Software Testing the Agilogy WayAgile Software Testing the Agilogy Way
Agile Software Testing the Agilogy WayJordi Pradel
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingTechWell
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test AutomationSauce Labs
 
David Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest IrelandDavid Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest IrelandDavid O'Dowd
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptxmianshafa
 
Exploratory Mobile Testing Webinar_XBOSoft_jean_annharrison
Exploratory Mobile Testing Webinar_XBOSoft_jean_annharrisonExploratory Mobile Testing Webinar_XBOSoft_jean_annharrison
Exploratory Mobile Testing Webinar_XBOSoft_jean_annharrisonXBOSoft
 
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...OlyaSurits
 
Architecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applicationsArchitecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applicationsMikhail Vasylchenko
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingSahar Nofal
 
Testing for Android: When, Where, and How to Successfully Use Test Automation
Testing for Android: When, Where, and How to Successfully Use Test AutomationTesting for Android: When, Where, and How to Successfully Use Test Automation
Testing for Android: When, Where, and How to Successfully Use Test AutomationTrent Peterson
 
Making a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanMaking a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanQA or the Highway
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Pedro Santos
 
When & How to Successfully use Test Automation for Mobile Applications
When & How to Successfully use Test Automation for Mobile ApplicationsWhen & How to Successfully use Test Automation for Mobile Applications
When & How to Successfully use Test Automation for Mobile ApplicationsTechnologyAssociationOregon
 
Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh          Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh tapsi sharma
 
EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...
EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...
EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...Isa Vilacides
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
IT8076 - SOFTWARE TESTING
IT8076 - SOFTWARE TESTINGIT8076 - SOFTWARE TESTING
IT8076 - SOFTWARE TESTINGSathya R
 

Similar to Lessons Learned in Test Automation From Zombieland (20)

Agile Software Testing the Agilogy Way
Agile Software Testing the Agilogy WayAgile Software Testing the Agilogy Way
Agile Software Testing the Agilogy Way
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated Testing
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
David Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest IrelandDavid Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest Ireland
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptx
 
Exploratory Mobile Testing Webinar_XBOSoft_jean_annharrison
Exploratory Mobile Testing Webinar_XBOSoft_jean_annharrisonExploratory Mobile Testing Webinar_XBOSoft_jean_annharrison
Exploratory Mobile Testing Webinar_XBOSoft_jean_annharrison
 
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
 
Architecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applicationsArchitecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applications
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Testing for Android: When, Where, and How to Successfully Use Test Automation
Testing for Android: When, Where, and How to Successfully Use Test AutomationTesting for Android: When, Where, and How to Successfully Use Test Automation
Testing for Android: When, Where, and How to Successfully Use Test Automation
 
Manual testing - Introduction to Manual Software testing
Manual testing - Introduction to Manual Software testingManual testing - Introduction to Manual Software testing
Manual testing - Introduction to Manual Software testing
 
Mt s5 levels
Mt s5 levelsMt s5 levels
Mt s5 levels
 
Making a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanMaking a Mock by Kelsey Shannahan
Making a Mock by Kelsey Shannahan
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014
 
When & How to Successfully use Test Automation for Mobile Applications
When & How to Successfully use Test Automation for Mobile ApplicationsWhen & How to Successfully use Test Automation for Mobile Applications
When & How to Successfully use Test Automation for Mobile Applications
 
Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh          Software, Security, manual testing training in Chandigarh
Software, Security, manual testing training in Chandigarh
 
EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...
EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...
EuroStar 2018 Testing in the hundred microservices world, when the pyramid be...
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
IT8076 - SOFTWARE TESTING
IT8076 - SOFTWARE TESTINGIT8076 - SOFTWARE TESTING
IT8076 - SOFTWARE TESTING
 

Recently uploaded

US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptbibisarnayak0
 
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMMchpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMMNanaAgyeman13
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 

Recently uploaded (20)

US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.ppt
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMMchpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 

Lessons Learned in Test Automation From Zombieland

  • 1. DRAFT Lessons learned on end to end testing from Matt Barbour Sr. Director Engineering Comcast Silicon Valley matt_barbour@cable.comcast.com STAREAST 2016 – May 4th, 2016
  • 2. Confidential and Proprietary What can we LEARN from a ZOMBIE MOVIE? • Characters in zombieland live by a set of rules in order to survive the chaos • Many of these apply in non- zombie situations too! Specifically: End-to-end testing in real world chaos. FOL 2014 Process Improvement Project – IDD Process1 Confidential and Proprietary
  • 3. Confidential and Proprietary End To End Testing as compared to distributed computing • Distributed systems expect failure because the real-world is chaotic • Strive to be fault tolerant by optimizing for desired characteristics of the end application according to the CAP Theorum 2 • End to end automated tests should have similar expectations about the environment they are operating in Automated Tests Performant Meaningful Repeatable Accurate PARM THEORY Tests must balance being: Performant, Accurate, Repeatable, and Meaningful
  • 4. Confidential and Proprietary KNOW YOUR WAY OUT BE FORWARD LOOKING AND OWN THE PROBLEM!! • Aim for excellence – don’t tolerate mediocrity • “that’s the way we have always done it”™ • Low pass rate • Tests cant finish quickly enough to give feedback on a checkin • Don’t know what a test is doing or why it exists • Inconsistent results • Aim for being in the center of the PARM matrix 3 Automa ted Tests P M R A
  • 5. Confidential and Proprietary BUDDY SYSTEM LEARN AND APPLY DEVELOPMENT BEST PRACTICES Developing E2E tests should be no different than developing an application GTAC 20154 • Design Patterns • Code Review • Unit Tests • Static Code Analysis Automat ed Tests P M R A
  • 6. Confidential and Proprietary RULE #31 CHECK THE BACK SEAT MAKE SURE YOURE NOT BRINGING ALONG UNWANTED DEPENDENCIES • Use a dependency management tool! • Explicitly declare all dependencies • Beware of depending on uber jars in a project… 5 Automat ed Tests P M R A
  • 7. Confidential and Proprietary A.B.T.  ALWAYS BE TESTING Trim the fat Look for opportunities to obtain useful test metrics outside of a traditional test Even idle devices can tell you something! 6 Automat ed Tests P M R A
  • 8. Confidential and Proprietary MAKE SURE YOUR TEST TOOLS SCALE • Use a test framework which allow you to scale in both directions (more devices in parallel) (more tests in parallel) • Use open source tools where possible • WebDriver isnt just for web and mobile!! 7 Automat ed Tests P M R A
  • 9. Confidential and Proprietary TRYING TO DO TOO MUCH IN A TEST IS A RECIPE FOR FAILURE! • Tests should focus on one thing, and one thing only. • BDD is helpful here • BDD scenarios should favor DAMP over DRY • DAMP = Descriptive and Meaningful Phrases • DRY = Don’t repeat yourself 8 Automated Tests P M R A
  • 10. Confidential and Proprietary Choose your test methodologies wisely • You can lose the war against unreliable, slow tests before you even start by your choice of test methodology • Known offenders – Image Comparison – Xpath – Record/Playback – Not controlling your data – The list goes on and on 9 RULE #7 TRAVEL LIGHT Automated Tests P M R A
  • 11. Confidential and Proprietary RULE #5 NO ATTACHMENTS CONTROL ALL THE DATA IN YOUR SYSTEM • If you have a data dependent test where you are not controlling the data you probably have an unstable test, or worse… • Mocking production data is time consuming… so is triaging false failures • Tests must be able to start from a known state 1 0 Automated Tests P M R A
  • 12. Confidential and Proprietary WORK AROUND OR ELIMINATE ARCHITECTURAL CONGESTION 11 •Shared resources are the enemy of test parallelism. •Your system’s architecture can get in the way here… don’t assume the application is infallible. Either work with it or modify it •Cloud deployments can mitigate architectural problems •VMs are cheap and easy to spin up and tear down Automated Tests P M R A
  • 13. Confidential and Proprietary Avoid Strangers This one is just plain wrong • The only way we can survive the slow unreliable test zombie apocalypse is by sharing tools and techniques. 12 All the test tools used by Comcast Silicon Valley are open-sourced: https://github.com/Comcast • Cucumber testing in parallel • Zucchini • Device Management • DAWG • Selenium Driver Management • Magic Wand • Theres a great deal of knowledge in the community out there, use it!!

Editor's Notes

  1. Chaos of zombie world vs chaos of real world Describe the chaos we are dealing with Service oriented architecture One application which runs server side but communicates with hardware in customers homes as well as 5-10 webservices managed by both internal and external groups and released on whatever intervals make sense for that team 15+ different models of hardware and growing The application itself running in a HA cluster across multiple data centers Cable TV – no tolerance for downtime
  2. CAP Theorem (Consistent, Available, Partition Tolerant - pick 2) Lots of analogies between distributed computing (DevOps) and automated testing PARM theory (Performant, Accurate, Repeatable/Precise, Meaningful - must have all 4) E2E testing should really be the smallest part of your “test pyramid”
  3. First step is to admit you have a problem Don’t tolerate mediocrity You want to have an engineering team which is empowered to solve problems and consider alternative solutions It’s a fine line – new and shiny doesn’t always mean good for your product Optimze for being in the middle of the PARM matrix
  4. - For automated tests to be really useful they need to be MORE reliable than the code it is testing - Analogy to semiconductor measurement Test Development and application development should be considered one and the same Treat test authoring as a first class citizen and apply industry standards / best practices
  5. This is in line with treating test development as a first class citizen, but is important enough that it deserves its own slide Use a dependency management tool – one exists for every language Lock down your dependencies Avoid transitive dependencies Dependency ranges Maven example Parent POM for dep mgmt tools which allow inheritance Uber Jars – leading cause of hair loss among test automation engineers
  6. Trim the fat by : removing hardcoded sleeps and unnecessary synchronization Bunch tests which have similar setup steps Pipeline and parallelize where it makes sense (more on that next) Look for other ways to get test coverage without adding additional tests Memory consumption, concurrency, etc Compare to idle devices
  7. Testing in real world conditions is going to be slower and more problematic than you would like ideally Combat this by scaling horizontally and vertically and avoiding proprietary frameworks where you can Scaling horizontal will allow you to get coverage of all your device compatibility tests - make sure you account for tests which cant run on certain device types Run same test on multiple instances of the same make/model/browser/os/etc - will help you suss out inconsitent tests Just scaling horizontally will still mean you are limited by slow tests. One way to combat this is to scale vertically. It can also be combined with horizontal scaling. For ex: Run your slow tests in parallel on one set of devices and simultaneously run your other tests in parallel on a separate set of devices Open source tools (especially the popular ones) have a community around them and are easy to hire people for Even if your application isnt web or mobile, you can make existing tools work. Things like WebDriver can be adapted to run against other device types
  8. Big monolithic tests are less desireable than narrowly focused tests. BDD is helpful in this regard Be careful to avoid antipatterns Too generic Too specific so that they lose meaning Trying to do DRY vs DAMP One case where good development practices don’t apply
  9. How you implement your tests can have a drastic impact on P, A, & R When you find anti-patterns in your test methodologies, the first step is to know WHY the test is authored that way When you get to root cause you may find that there is a better way to do it If theres no better way to do it you have the knowledge to minimize the damage or just kill the test Image Comparison example
  10. Failure to control your data is quite often the biggest contributor to unstable tests If you have a data dependent test you quite likely have an unstable test or worse, youre letting defects get through to production Why? Mocking prod code is HARD and SLOW… so is triaging false failures or HOPE is NOT a strategy Sports example: Live events are unpredictable Rain delays, overtime, cancellations, etc Live events generally happen in off hours Don’t boil the ocean though – look at what your tests require and mock out only that
  11. Identify architectural congestion in your application or tests Shared resources are the enemy of test parallelism Singletons are a big problem here (but not the only one) First step is to define whether the arch congestion is the correct design for your users. If its not, congrats, you’ve found a defect. If it is, then you have to figure out how to work around the congestion Sports example again Data layer serves multiple clients. If your tests are controlling the data like they should then you will start clobbering yourself once you strat trying to scale our horizontally Cloud deployments can help here – the brute force approach is to throw up identical clusters. In the absence of that (either by necessity or choice) you are left with trying to synchronize across tests