SlideShare a Scribd company logo
Melissa Benua / Director of Engineering
Test Design for
Fully Automated
Build Architectures
STAREAST 2020
ABOUT ME
Melissa Benua
Director of Engineering
mParticle
Get in touch!
mbenua@gmail.com
@queenofcode
Follow my work!
https://www.linkedin.com/in/mbe
nua/
https://www.slideshare.net/Meliss
aBenua/
https://github.com/queen-of-
code/
https://queenofcode.net
STAREAST 2020 @QUEENOFCODE
ABOUT THE TUTORIAL
1. Track Work
Ensure the right
change is being
made
2. Write Code +
Tests
Keep prod and test
code together in
source control
3. Request a Peer
Review
Automated system to run
build + unit test + static
6. Monitor Change in
Prod
Ensure nothing
unexpected happened
with the change
5. Merge Peer
Review
Land code + tests
together for
deployment
4. Deploy Change for
Testing
Validate the change
works in a prod-likeSTAREAST 2020 @QUEENOFCODE
KEY SECTIONS
Learning
continuous test
case principles
and features
1
Defining the
continuous
integration
pipeline
2
Categorizing test
cases into suites
3
Leveraging
observability to
backstop testing
4
@QUEENOFCODESTAREAST 2020
Continuous Test
Case Principles
WHAT ARE WE DOING HERE?
01 Unit
Tests
02 Integration
Tests
03 Specialty
Tests
TEST CASE PYRAMID
@QUEENOFCODESTAREAST 2020
TEST CASE KEY FEATURES
Important
Reliable
Specific
@QUEENOFCODESTAREAST 2020
IMPORTANCE
Triage
scenario
s based
on
priority
Don’t try
to cover
every
scenario
Run the
most
importa
nt tests
first
Understa
nd what
failures
can be
tolerated
@QUEENOFCODESTAREAST 2020
IMPORTANCE
Build Failure? UI Test Failure?
@QUEENOFCODESTAREAST 2020
RELIABILITY
Not
flakey
Has no
false-
negative
s or
false-
positives
Cleans
up after
itself
Repeatabl
e without
human
interventi
on
@QUEENOFCODESTAREAST 2020
RELIABILITY
@QUEENOFCODESTAREAST 2020
SPECIFICITY
Doesn’t
boil the
ocean
Is a clear
answer
to a
clear
question
Minimiz
es
overlaps
in
coverage
Has one
main
goal
@QUEENOFCODESTAREAST 2020
SPECIFICITY
@QUEENOFCODESTAREAST 2020
PROCEED WITH CAUTION
Shared
resource
reliance
1
Single-
threading
2
Long
duration test
time
3
Caching
4
@QUEENOFCODESTAREAST 2020
EXERCISE: TEST CASES
Photo
Gallery Site
UX FrontEnd
(HTML5 + JS)
Logic BackEnd
(Java)
Data Store
(NoSQL)
• What to test?
• All ideas are good
ideas!
@QUEENOFCODESTAREAST 2020
Continuous Test
Categorization
WHAT DOES IT LOOK LIKE?
CI + CD PIPELINE
1. Track Work
Ensure the right
change is being
made
2. Write Code +
Tests
Keep prod and test
code together in
source control
3. Request a Peer
Review
Automated system to run
build + unit test + static
6. Monitor Change in
Prod
Ensure nothing
unexpected happened
with the change
5. Merge Peer
Review
Land code + tests
together for
deployment
4. Deploy Change for
Testing
Validate the change
works in a prod-likeSTAREAST 2020 @QUEENOFCODE
UNIT TEST GUIDELINES
Does not cross application
boundaries
Should support parallelism
Textual `Input -> Output` validation
Does NOT leave the box
@QUEENOFCODESTAREAST 2020
BEYOND UNIT TESTS
Build
•Compile change against
mainline
•Execute unit tests
Deploy
•Deploy change to testing
environment
•Execute integration tests
Validate
•Execute UI + load tests
•Manual signoff
•Monitoring signoff
• Project structure?
• Moving parts?
• Functional
boundaries?
• Shared resources?
• Mocking potential?
@QUEENOFCODESTAREAST 2020
EXAMPLE SERVICE ARCHITECTURE
UI App
JS Framework
ASP Frontend
Web Server
Backend App
Auth Service
RESTful API
Cache Service
Data Layer
Database
File Storage
@QUEENOFCODESTAREAST 2020
EXAMPLE SUITE BREAKDOWN
Unit Test
Integration
Test
Speciality
Test
JS Suite
Auth
Service
SuiteShared
Library
Suite
Smoke
Suite
E2E API
Suite
Auth Suite
Visual UI
Suite
Load Suite
Security
Suite
@QUEENOFCODESTAREAST 2020
TEST FLOW
Build Change 01
Build
Javascri
pt
Run JS
Unit
Tests
Create App
Package
02
Deploy App
Package
03
Validate
Product
04
Build UI
App
Run All
Unit
Tests
Deploy UI
App
Run Service
Tests
Run Specialty
Tests
Validate@QUEENOFCODESTAREAST 2020
@QUEENOFCODESTAREAST 2020
INTEGRATION TEST GUIDELINES
Crosses application boundaries
Does not require manual
intervention
Simple `Input -> Output` validation
Follows user stories
@QUEENOFCODESTAREAST 2020
INTEGRATION TEST MATRIX –
LOGIN STORY
UI App
JS Framework
ASP Frontend
Web Server
Backend App
Auth Service
RESTful API
Cache Service
Data Layer
SQL DB
NoSQL DB
@QUEENOFCODESTAREAST 2020
INTEGRATION TEST MATRIX – API
STORY
UI App
JS Framework
ASP Frontend
Web Server
Backend App
Auth Service
RESTful API
Cache Service
Data Layer
SQL DB
NoSQL DB
@QUEENOFCODESTAREAST 2020
SPECIALTY TEST GUIDELINES
Crosses many boundaries
Requires manual intervention or
setup
Complex validation
Validates non-functional
scenarios
@QUEENOFCODESTAREAST 2020
EXERCISE: MAPPING CASES TO
CATEGORIZED SUITES
Photo
Gallery Site
UX FrontEnd
(HTML5 + JS)
Logic BackEnd
(Java)
Data Store
(NoSQL)
• What should we run?
• When should we run it?
• How long should we wait?
@QUEENOFCODESTAREAST 2020
KEY TAKEAWAYS
Easy to
conditionally
run different
categories
1
Find the balance
between too
many stages
and too few
2
Machine time is
MUCH cheaper
than human
time
3
Fail fast and fail
often
4
@QUEENOFCODESTAREAST 2020
Monitoring and
Reporting
WHAT JUST HAPPENED?
CODE
HEALTH
STAREAST 2020 @QUEENOFCODE
IF YOUR SITE CRASHES ON THE
INTERNET BUT ISN’T MONITORED,
IS IT REALLY DOWN???
STAREAST 2020 @QUEENOFCODE
PILLARS OF OBSERVABILITY
Logging
•Detailed information
•Specific events
Metrics
•Systemic
informatio
n
•Events
over time
Tracing
•Systemic information
•Specific events
@QUEENOFCODESTAREAST 2020
LOGGING VS METRICS
Text Log File? Graph?
@QUEENOFCODESTAREAST 2020
METRIC TYPES
Rate
Success Requests Per
Second
Failure Requests Per
Second
Events Per Second
Percentile
Request Latency
Database
Latency
6
0
%
9
0
%
60 75 5090
Number
Max items in
queue
Bytes in use
2-Feb 3-Feb 4-Feb 5-Feb
Avg 90th 99th
@QUEENOFCODESTAREAST 2020
USING METRICS
@QUEENOFCODESTAREAST 2020
METRICS AND ALERTS
@QUEENOFCODESTAREAST 2020
METRICS AND AUTOMATION
Function Call Validate
A = 2
B = 5
Calls ==
11
5 == A
0 == B
12 == Calls
Create Input
void Call(ref int A, ref int B)
{
A = DoWork();
B = DoOtherWork();
CallsCounter.Increment();
}
@QUEENOFCODESTAREAST 2020
KEY TAKEAWAYS
Respect natural
system
architectural
boundaries
1
Know where your
cutline is and
respect your time
2
Don’t try to boil
the ocean – rely on
the backstop!
3
Use and manage
your data wisely
4
@QUEENOFCODESTAREAST 2020
Thank you!
GET IN TOUCH!
MELISSA BENUA
MBENUA@GMAIL.COM
TWITTER: @QUEENOFCODE
HTTPS://QUEENOFCODE.NET

More Related Content

PPTX
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
PDF
Test Automation Architecture
PDF
Modern Functional Test Automation Through Visual AI - webinar w/ Raja Rao
PPTX
Why Apps Succeed: 4 Keys to Winning the Digital Quality Game
PDF
Wrong Tool, Wrong Time: Re-Thinking Test Automation -- w/ State of Visual Tes...
PPTX
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
PPT
Enterprise Ready Test Execution Platform for Mobile Apps
PDF
"Software Quality in the Service of Innovation in the Insurance Industry"
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
Test Automation Architecture
Modern Functional Test Automation Through Visual AI - webinar w/ Raja Rao
Why Apps Succeed: 4 Keys to Winning the Digital Quality Game
Wrong Tool, Wrong Time: Re-Thinking Test Automation -- w/ State of Visual Tes...
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
Enterprise Ready Test Execution Platform for Mobile Apps
"Software Quality in the Service of Innovation in the Insurance Industry"

What's hot (19)

PDF
quality @angieslist
PDF
Supercharge Your Spring Boot Apps!
PDF
[TAQfull Meetup] Angie Jones + Expert Panel: Best Practices in Quality Manage...
PDF
Mastering spring 5.0 - By SADIK SAID
PDF
ESLint Plugin for UI Tests
PDF
Not Just Initializing
PDF
4 Ways to Speed Up Your Mobile App Dev Daily Grind
PDF
Your Framework for Success: introduction to JavaScript Testing at Scale
PPTX
Jenkins as the Test Reporting Framework
PPTX
Make the Shift from Manual to Automation with Open Source
PPTX
1, 2, 3 build - continuous integration for mobile apps
PPTX
The State of Testing 2017
PDF
Feature Scoring in Green Field Application Development and DevOps
PDF
Accelerating Digital Transformation With API Lifecycle & Test Automation
PPTX
Advanced Codeless Testing for Web Apps
PPTX
Visual Testing: The Missing Piece of the Puzzle -- presentation by Gil Tayar
PPTX
Automated Visual Testing in NSW.Gov.AU
PPTX
Keeping Your Continuous Test Automation Suites Continuously Valuable in DevOps
quality @angieslist
Supercharge Your Spring Boot Apps!
[TAQfull Meetup] Angie Jones + Expert Panel: Best Practices in Quality Manage...
Mastering spring 5.0 - By SADIK SAID
ESLint Plugin for UI Tests
Not Just Initializing
4 Ways to Speed Up Your Mobile App Dev Daily Grind
Your Framework for Success: introduction to JavaScript Testing at Scale
Jenkins as the Test Reporting Framework
Make the Shift from Manual to Automation with Open Source
1, 2, 3 build - continuous integration for mobile apps
The State of Testing 2017
Feature Scoring in Green Field Application Development and DevOps
Accelerating Digital Transformation With API Lifecycle & Test Automation
Advanced Codeless Testing for Web Apps
Visual Testing: The Missing Piece of the Puzzle -- presentation by Gil Tayar
Automated Visual Testing in NSW.Gov.AU
Keeping Your Continuous Test Automation Suites Continuously Valuable in DevOps
Ad

Similar to Test Design for Continuous Integration and Delivery (2020) (20)

PPTX
Test Design for Fully Automated Build Architectures
PPTX
Test Smarter Not Harder - how to design tests for continuous delivery
PPTX
GAB2017 - Azure function to build serverless SharePoint apps
PPTX
Visual Studio 2017 - Montreal Launch Event
DOCX
Aaron_Portier_Resume1.23.17
PPTX
What’s new in VS 2015 and ALM 2015
 
PPTX
Visual studio 2017 - Launch Event Keynote
PPTX
Automated Release Pipelines with Azure DevOps
PDF
Test automation design patterns
PDF
Maveryx presentation
PPTX
Whats New In 2010 (Msdn & Visual Studio)
PDF
BDD and Test Automation in Evalutionary Product Suite
PPT
Vsts Msdn Presentation2003
PPTX
Lap Around Visual Studio 2010 Ultimate And TFS 2010
PPTX
Lab Management with TFS 2010
PDF
WSO2Con EU 2015: Keynote - The Containerization of the Developer Workspace
PPTX
Microsoft DevOps Solution - DevOps
DOCX
WENLONGZHU
PPTX
Agile azure manchester azure user group v3
PDF
DevSecOps
Test Design for Fully Automated Build Architectures
Test Smarter Not Harder - how to design tests for continuous delivery
GAB2017 - Azure function to build serverless SharePoint apps
Visual Studio 2017 - Montreal Launch Event
Aaron_Portier_Resume1.23.17
What’s new in VS 2015 and ALM 2015
 
Visual studio 2017 - Launch Event Keynote
Automated Release Pipelines with Azure DevOps
Test automation design patterns
Maveryx presentation
Whats New In 2010 (Msdn & Visual Studio)
BDD and Test Automation in Evalutionary Product Suite
Vsts Msdn Presentation2003
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lab Management with TFS 2010
WSO2Con EU 2015: Keynote - The Containerization of the Developer Workspace
Microsoft DevOps Solution - DevOps
WENLONGZHU
Agile azure manchester azure user group v3
DevSecOps
Ad

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
KodekX | Application Modernization Development
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
sap open course for s4hana steps from ECC to s4
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KodekX | Application Modernization Development
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Encapsulation theory and applications.pdf

Test Design for Continuous Integration and Delivery (2020)

Editor's Notes

  • #3: Talk about Microsoft and Bing especially Key things to hit: * Worked with continuous builds in some form for my entire career Worked as an SDET, as a straight dev, and as a combined engineer Created this from scratch at PlayFab Talk about Microsoft and Bing especially Key things to hit: * Worked with continuous builds in some form for my entire career Worked as an SDET, as a straight dev, and as a combined engineer Created this from scratch at PlayFab
  • #4: This is an automated pipeline! Don’t get too in-depth, we will talk more Talk notes: * Please speak up if there’s a question Feel free to ask questions at any time, or for examples or to deep-dive * Ask about experience in the room – who is working greenfield? Updating an old existing code base? Working in an existing CI/CD pipeline? What we are going to talk about: What makes a good test case, when we want to run those test cases, and then how we monitor and report on those test cases
  • #6: These are my guiding principles of test design – ESPECIALLY KEY when things are fully-automated
  • #8: * Don’t bog down on what these mean, but give a high-level overview
  • #9: In a perfect world, we would always run every test In a perfect world, every test would be super fast and we would also have infinite time Battlefield triage is key!
  • #10: If you had time to only debug one of these two issues, which would you do? The ‘time game’ is a fun way to figure out what tests really matter
  • #11: Squeaky tests only train people to ignore test failures – and then they WILL ignore a real failure and it will go to prod by accident – ask me how I know! Try – finally blocks are amazing – no catches required! Any test that touches the file system or DB system must do that. Obviously – a test can’t be automated if it requires someone to manually purge the DB after it runs
  • #12: Sometimes tools can help you find flaky tests
  • #13: Be ruthless with cutting out overlapping coverage – read your code coverage reports and slash away! Can be nerve-wracking to delete tests Very tempting to roll lots of things into a single test case to save time, but this makes debugging a nightmare
  • #15: * Watch out for global static variables. Watch out even more for a shared test database NEVER (almost never) write a test that relies on Thread.Sleep. Timing issues are horrible to debug! Can you make it synchronous? A callback?? Caching and shared resources can introduce the weirdest and hardest to debug test failures. Time-killers! Spend time to work around them beforehand instead of spending time debugging the failure (and then having to work around them anyways) * Talk about the angst from the shared test Dynamo at Playfab and the days spent figuring out what happened and how to stop it
  • #16: The goal is to come up with lots and lots of test cases, which we will later be organizing into test suites DO NOT get into putting them into suites DO NOT throw away tests
  • #18: This is an automated pipeline! Don’t get too in-depth, we will talk more Talk notes: * Please speak up if there’s a question Feel free to ask questions at any time, or for examples or to deep-dive * Ask about experience in the room – who is working greenfield? Updating an old existing code base? Working in an existing CI/CD pipeline? What we are going to talk about: What makes a good test case, when we want to run those test cases, and then how we monitor and report on those test cases
  • #19: Unit tests may cross functional boundaries, in that they may test more than one ‘function’. But they shouldn’t test an app.
  • #20: * Simplest structure means running one build, one set of tests, and calling it done. Few projects can be that simple! Tests grow with scale! Breaking up a code base is half art and half science. (those are the bullet points) Ideally every test would run all the time, but almost nobody has time for that. Test what you can, and know what risk you are swallowing for later Make sure each stage fails quickly if it’s going to fail. Do NOT propagate failures down the pipe.
  • #21: This is the sample architecture of a fictional service – say, something like that image hosting site from our last example. We’ll use this architecture as a guide for the talking about what tests to write and when to run them.
  • #22: Many more potential test suites in these categories.
  • #23: Remember – if you’re going to have manual steps, it’s in step 4.
  • #24: This is a sequence diagram that describes the lifecycle of a single change. The tester is actually in control here – we are conditionally running different tests suites depending on their judgement of the change
  • #25: ‘Integration’ test here is category. A number of test suites can fall into this category – your smoke test suite, for example.
  • #28: Speciality is anything that can’t be run automatically and quickly. Maybe it requires manual setup, or maybe it’s difficult to have a machine to validate. Maybe it just takes a MILLION years to run. Maybe it is unreliable.
  • #29: * let’s use all the tests that we came up with before, and now let’s prioritize and move them into test suites. * Let’s give each test suite a maximum wait time before a failure is cheaper than waiting for it to pass.
  • #32: This graph is not scientific! In my experience, the sweet spot is somewhere between 70 and 80% code coverage. Any more than that is a whole lot of time for not much return. Line coverage just means a line was run,. Branch coverage includes proper handling of ifs and switches. It’s generally more diagnostic. Lets you know what needs to be tested more – a 5% covered package versus a 50% covered package Quanitify the output of your test efforts over time to management! They eat this stuff up (HA HA HA)
  • #35: Which of these would you rather debug?