SlideShare uma empresa Scribd logo
1 de 21
Sydney Serverless Meetup
October 18th 2018
Serverless Testing
Rowan Udell, October 18th 2018
What I Wish Everyone Knew
About Serverless Testing
(Including Past Rowan)
Rowan Udell, October 18th 2018
Why test?
Why test?
• Feedback loop
• Discover problems (bugs) before your users do
Don’t make your users do your testing
• Time
• It’s good for writing software locally
It’s even better in the cloud
Why test serverless?
• Running on someone else’s computer
• Blurred lines between code and infrastructure
• I’ll have two DevOps please
Are you more Dev or more Ops?
• Limited surface area
• Scale
• Cost
Test ROI
• The most important thing!
• Some things that impact ROI:
• Speed
• Brittleness
• Complexity
• Maybe don’t write tests?
Heresy! *BLAM*
www.bennorthrop.com
Working Effectively with Unit Tests
wewut.com
The Testing Pyramid
willowtreeapps.com
Unit Tests
• White box
• Many
• Small
• Fast!
Serverless
• Isolate functionality
• Local (code)
Example: Naive
Example: Better
Integration Tests
• Higher level than unit tests
• Cross responsibility boundaries
Serverless
• Harder, but also more valuable
• Per request
• Mocks?
Don’t mock what you don’t own
• Don’t mock the cloud
You’ll hurt it’s feelings
• Don’t build the cloud locally
• Beware brittle tests!
Integration Example
• SAM CLI
Includes API GW
• Dynalite https://github.com/mhart/dynalite
Not the official DDB version
• Pact https://docs.pact.io/
It’s not a mock
E2E Tests
• aka UI Tests
• Black box
• Lots of things can cause failures
Limit exposure to external systems
• Non-functional tests
Serverless
• Do it in production
Only production is production
E2E Examples
• Automated user testing
• Monitoring services*
• Test environments
• Code paths
Warming functions
Manual Testing
• Not part of the pyramid?!
• You already doing it
• Inconsistent
• Doesn’t scale
• Don’t forget the ROI!
Testing is hard!
…but you should still do it
Testing is a skill
Serverless is just software
(with different boundaries)
Thanks!
Any questions?

Mais conteúdo relacionado

Mais procurados

Solving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi HevroniSolving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi HevroniDevOpsDays Tel Aviv
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jestpksjce
 
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Dakiry
 
Creating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactCreating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactJp DeVries
 
Building occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcingBuilding occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcingDennis Doomen
 
DevOps with elmah.io on Umbraco Cloud
DevOps with elmah.io on Umbraco CloudDevOps with elmah.io on Umbraco Cloud
DevOps with elmah.io on Umbraco CloudThomas Ardal
 
How to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footHow to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footDennis Doomen
 
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...TEST Huddle
 
Cross-browser unit testing JavaScript
Cross-browser unit testing JavaScriptCross-browser unit testing JavaScript
Cross-browser unit testing JavaScriptAlan Parkinson
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovySteve Pember
 
How to build webapps with tools
How to build webapps with toolsHow to build webapps with tools
How to build webapps with toolsPasindu Perera
 
An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...Steve Pember
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish DatabaseGaetano Giunta
 
devworkshop-04_13_2016-ucsdnow-presentation
devworkshop-04_13_2016-ucsdnow-presentationdevworkshop-04_13_2016-ucsdnow-presentation
devworkshop-04_13_2016-ucsdnow-presentationAlex Wu
 
TallyJS #1 - Intro to AngularJS
TallyJS #1 - Intro to AngularJSTallyJS #1 - Intro to AngularJS
TallyJS #1 - Intro to AngularJSAndrew Hart
 
Build Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with SeleniumBuild Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with SeleniumTechWell
 
Symfony vs. Message Brokers
Symfony  vs.  Message BrokersSymfony  vs.  Message Brokers
Symfony vs. Message BrokersGaetano Giunta
 

Mais procurados (19)

Solving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi HevroniSolving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi Hevroni
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
 
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
 
Creating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactCreating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with React
 
Building occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcingBuilding occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcing
 
DevOps with elmah.io on Umbraco Cloud
DevOps with elmah.io on Umbraco CloudDevOps with elmah.io on Umbraco Cloud
DevOps with elmah.io on Umbraco Cloud
 
How to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footHow to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the foot
 
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real ...
 
Cross-browser unit testing JavaScript
Cross-browser unit testing JavaScriptCross-browser unit testing JavaScript
Cross-browser unit testing JavaScript
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of Groovy
 
How to build webapps with tools
How to build webapps with toolsHow to build webapps with tools
How to build webapps with tools
 
Scaling small apps
Scaling small appsScaling small apps
Scaling small apps
 
An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish Database
 
devworkshop-04_13_2016-ucsdnow-presentation
devworkshop-04_13_2016-ucsdnow-presentationdevworkshop-04_13_2016-ucsdnow-presentation
devworkshop-04_13_2016-ucsdnow-presentation
 
Tests that talk
Tests that talkTests that talk
Tests that talk
 
TallyJS #1 - Intro to AngularJS
TallyJS #1 - Intro to AngularJSTallyJS #1 - Intro to AngularJS
TallyJS #1 - Intro to AngularJS
 
Build Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with SeleniumBuild Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with Selenium
 
Symfony vs. Message Brokers
Symfony  vs.  Message BrokersSymfony  vs.  Message Brokers
Symfony vs. Message Brokers
 

Semelhante a Serverless testing-serverless-sydney-20181018

Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayBizTalk360
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Ford Prior
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivAndrzej Krzywda
 
ConFoo: Moving web performance testing to the left
ConFoo: Moving web performance testing to the leftConFoo: Moving web performance testing to the left
ConFoo: Moving web performance testing to the leftTom Chavez
 
Belfast Selenium Meetup
Belfast Selenium MeetupBelfast Selenium Meetup
Belfast Selenium MeetupJustin Ison
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptTroy Miles
 
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Dinis Cruz
 
Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot frameworkPrayoch Rujira
 
Oleksandr Khotemskyi - Serverless architecture and how to apply it in Automa...
Oleksandr Khotemskyi  - Serverless architecture and how to apply it in Automa...Oleksandr Khotemskyi  - Serverless architecture and how to apply it in Automa...
Oleksandr Khotemskyi - Serverless architecture and how to apply it in Automa...Web Tech Fun
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Jason Tice
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham.NET Conf UY
 
Avoiding test hell
Avoiding test hellAvoiding test hell
Avoiding test hellYun Ki Lee
 
Supersize me: Making Drupal go large
Supersize me: Making Drupal go largeSupersize me: Making Drupal go large
Supersize me: Making Drupal go largeTom Phethean
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBOren Eini
 
Performance Tuning in the Trenches
Performance Tuning in the TrenchesPerformance Tuning in the Trenches
Performance Tuning in the TrenchesDonald Belcham
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalQA or the Highway
 

Semelhante a Serverless testing-serverless-sydney-20181018 (20)

Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration Monday
 
Beyond The Rails Way
Beyond The Rails WayBeyond The Rails Way
Beyond The Rails Way
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)
 
Benefits from AATs
Benefits from AATsBenefits from AATs
Benefits from AATs
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, Lviv
 
ConFoo: Moving web performance testing to the left
ConFoo: Moving web performance testing to the leftConFoo: Moving web performance testing to the left
ConFoo: Moving web performance testing to the left
 
Belfast Selenium Meetup
Belfast Selenium MeetupBelfast Selenium Meetup
Belfast Selenium Meetup
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
 
Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
 
Rails tools
Rails toolsRails tools
Rails tools
 
Oleksandr Khotemskyi - Serverless architecture and how to apply it in Automa...
Oleksandr Khotemskyi  - Serverless architecture and how to apply it in Automa...Oleksandr Khotemskyi  - Serverless architecture and how to apply it in Automa...
Oleksandr Khotemskyi - Serverless architecture and how to apply it in Automa...
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
Avoiding test hell
Avoiding test hellAvoiding test hell
Avoiding test hell
 
Supersize me: Making Drupal go large
Supersize me: Making Drupal go largeSupersize me: Making Drupal go large
Supersize me: Making Drupal go large
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
 
Performance Tuning in the Trenches
Performance Tuning in the TrenchesPerformance Tuning in the Trenches
Performance Tuning in the Trenches
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh Dahal
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Serverless testing-serverless-sydney-20181018

Notas do Editor

  1. <Versent introduction and sponsorship blurb> TBC AWS only, AWS Premier, awards, etc We’re hiring! AWS focused talk, because Versent.
  2. So first I want to go in to a bit of “why test?” in generally, and then specifically for serverless. If you’re a software developer, hopefully this is not a tough sell. If you’re not familiar with the benefits of testing software, hopefully I can convince you to consider it. Even if you’re an experienced developer, I think we can sometimes benefit from being reminded these things, so hopefully you get something from this talk too. Don’t test just because some guy at a meetup says you should. Do it because it makes sense.
  3. Developer feedback is one of the main reason “A stitch in time saves 9” Time is the most important reason to test, and one of the more counter-intuitive ones. The reality is tests are extra code, and extra code take extra time to write. You also have to maintain that extra code. The trick is that (hopefully) little bit of extra code you write makes it exponentially easer to maintain the rest of your code It results in a faster development speed over the lifetime of your codebase. “Time is money.” By ”better” I mean “more valuable” It’s much easier to see and quantify the value.
  4. At the end of the day your functions are running on someone else’s computer – that’s the whole point!!!!1! This has several implications… Many people experimenting with serverless these days don’t necessarily have a software development background. There are no more “sysadmins” only “devops”. That’s a good thing, but I think there are some fundamental lessons from software development that can be applied to operations in a infrastructure as code world. There’s only a limited surface area you can test, so I think it becomes more important – and valuable – to do so. Your code can go from your machine to all of these locations in a matter of minutes. I could’ve included a much more detailed diagram of locations, but I don’t want to annoy AWS, like I said we’re AWS only, so that would bad idea! That’s amazing – who would’ve thought it just 5 years ago - but also scary. This power means it’s even more important As I tell our customers: if you automate without testing, all you’ve done is enabled yourself to fail really really fast. There are plenty of horror stories out there of people creating event loops and racking up major bills. Every execution (theoretically) costs you money, and I don’t know about you but I’d rather not pay for my bugs to run. I just don’t like stack traces that much. This is one of the reasons why the Lambda free tier makes so much sense; It lets you develop and test you application for free. Developer time is going to be the biggest cost of almost any application, but particularly a serverless one! Because you only pay for the actual running time of your application, many applications cost orders of magnitude less to run when serverless, which makes the developer cost (as a proportion of total cost) even higher.
  5. I wish more people spoke and thought with the term “Test ROI” in mind. If you take nothing else from this talk, take this point. This is the idea that the tests you write must have good return on investment. ”Investment” means a number of things: the time it takes to write the tests, the time it takes to run them, and the amount of maintenance they require. We often talk about avoiding “brittle” tests, and that’s because brittle or fragile tests cost more to maintain, reducing their ROI. Test speed is another thing that matters a lot, and effects the ROI – as anyone who’s spent their days waiting for a slow test suite to return. ROI happens at different levels: at a specific test level (which we’ll go in to with the pyramid), but also at an application level. This idea is also how I justify not writing tests (gasp! Heresy!). If your application is just a PoC and is definitely going to get thrown out, then writing tests that you know will get thrown out probably doesn’t make much sense. The probable is always when a PoC makes it way in to production… This is just one of the reasons I think you should always throw out the first version of an application, but that probably needs a different talk to cover off properly.
  6. Credit to this book for introducing me to test ROI as a concept. Highly recommended if you’re after a practical guide. It’s python based, but the ideas are applicable. It’s also been a while since I read it, so if I misquote something that’s my fault.
  7. Hopefully you’ve all seen this diagram before. The test pyramid is a nice visual way to communicate a good approach to writing tests, which compliments the idea of testing ROI nicely. I stole this image from that website because it was the nicest test pyramid I could find out there – most of them look absolutely horrible, with strange gradients, etc. Seriously, if you want to see some horrible clipart do a Google Image Search for the testing pyramid.
  8. TBC Pyramid Called “white box” because they interact directly with your code. You almost (almost!) can’t have too many. They shouldn’t be very big, hence “unit”. Test one thing, and one thing only – rarely should you have more than one assertion. I’m not going to give you a hard number here, but they shouldn’t be much over a single-digit number of lines. Long Unit Tests are a code smell - there better be a good (and obvious) reason for them. They need to be fast. If you’re going to have lots of them, it makes sense that you wouldn’t want to be waiting around for them to run. In the case of serverless, in order to keep them fast you will need to run them locally. Note that I’m not talking about running them in a container locally (we’ll get to that). These should just be pure code execution. A well written will be isolated. They should test one thing, and test it well. Avoid “cascading failures” – if too many unit tests fail at once, then your tests are probably overlapping (makes maintenance harder). I like to think in terms of “happy path” and “sad path” – testing positive and negative scenarios. This is often where I see developers (or operations) struggling – you will need to change how you might intuitively write your code. Basically, this is how you should be writing unit tests anyway, so keep doing that. All this to say they can be relatively low value, because they are low cost (to maintain, run, etc), which means they still have a good testing ROI.
  9. When I talk about ”pure code” I mean something without any external dependencies
  10. As the name suggests they test the integration of components. This is one of the areas where serverless gets difficult – the things you’re integrating with are not part of your application any more (e.g. storage). Where you draw the line is up to you, but I usually aim for the endpoint level in a serverless API. I find integration tests to be harder to write in a serverless world, but also more valuable (otherwise I wouldn’t do them). This is because you’re inherently integration with external systems. Inherently stateless. Want to store some state? That needs an external system. Unlikely to be able to make assumptions about the environment. In practice, I generally scope integration tests down to specific requests. This means it doesn’t include things like complicated application flows, they go to E2E The difference between integration testing and E2E is a blurred one in serverless, so if you’ve got a good (simple) rule of differentiating then I’d like to hear it.
  11. TBC Sad cloud Some teams have been using localstack with success, so you might use it. I tried to do it a while back, and got burnt enough that I’ve avoided it since. Mocking other people’s code is one of the most brittle things you can do!
  12. Pact is an example of an approach I like. You’re not mocking the downstream system, you’re just calling out explicitly what you expect the response to be. If the response does not match, it’s obvious where the issue is. This makes isolating the cause of test failures as easy as possible
  13. TBC Neddy No No Picture
  14. TBC Pyramid Sometimes called “UI Tests” Usually “black box” tests, because they don’t care (or know) about the code being tested – they happen at a higher level. These tests are designed to be sensitive to failures anywhere in your system. This might include external systems, which can be really annoying to be notified about, but are still valuable. Ideally you would limit your exposure to those external systems (so you don’t just turn your tests in to a monitoring tool for their system), and as apriority you would want to make it clear what the cause of the test failure is. Remember that the aim of testing is not just to have passing tests (which are nice) – it’s about finding problems before your users do. I said “limit” because it’s likely you can avoid some exposure, just keep in mind testing ROI (which might mean you remove flakey tests). Limit false negatives where possible (but it’s probably impossible). Avoid brittle tests, which will probably take more time up front. E2E tests are also where I would include non-functional tests, but obviously you could include non-functional testing at the other test levels of the pyramid. I’m just not convinced that there’s the right testing ROI for non-functional tests at those levels. We’re testing for user experience, not testing’s sake. If there is, it’s unlikely to be one of the first things you do with an application, maybe you’d come back and add them for a particularly important or mature application (which are usually the same thing!). Especially in a serverless world, where scaling is not usually an issue. Finally, I think you should be running these test in production! This might have been a bit controversial just a few years back, but I’m seeing the idea gain traction and acceptance. Even in a cloud environment where I can reproduce my entire production stack (using infrastructure as code) in a matter of minutes, it’s still not easy (or maybe possible) to reproduce the exact data (which might have compliance issues), load, and behaviour. Who really knows what users are going to do to your system!? TBC Example scenario Testing in production: You already do it Charity Majors: “Only production is production”
  15. One way of doing this is by creating specific code paths for testing in your application. I see a bit of this out there, but not a whole lot.
  16. Even if you don’t have automated tests, you’re still doing manual testing. No code was written without some manual testing. Just keep in mind the ROI.