SlideShare une entreprise Scribd logo
1  sur  81
Télécharger pour lire hors ligne
The utlimate
SERVERLESS
TESTING GUIDE
#WISSENTEILEN
THE PRACTICAL SKILLS YOU‘LL
NEED TO TEST SERVERLESS
by Lars Röwekamp
a.k.a @mobileLarson
ABOUT OPEN KNOWLEDGE
Software development and IT consulting
ABOUT ME
Who am i?
• CIO New Technologies
• Enterprise & Mobile
• Author, Speaker, Coach & Mentor
• Snowboard & MTB Enthusiast
• Traveller between the worlds
Lars Röwekamp (a.k.a. @mobileLarson)
LR
Testing
Serverless
Shouldn‘t be to
complicated!- famous last words -
Testing is about …
gaining confidence in your
code running as expected on
a specific target platform.
Testing is about …
minimizing the risk that
something unexpected will
happen in production.
„What does this mean in the
context of Serverless?"
„Run Code,
not Servers!“
#WISSENTEILEN
“Run your business code
highly-available
in the cloud in response
to events and scale
without any servers to
manage.“*
*(AWS Lambda product description)
#WISSENTEILEN
“Run your business code
highly distributed
and event driven in a non
transparent environment
with no single
point of control.“*
*(my personal interpretation)
The Road to the Cloud ...
The Serverless Showcase
AWS Cloud
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
Store raw Image
1
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
Store raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
AWS Step Functions workflow: Store Image
Store raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
AWS Step Functions workflow: Store Image
Create ThumbnailStore raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
Use-Case: Upload Image
upload image
with additional
information
„What can go
wrong?“
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
AWS Cloud
AWS Step Functions workflow: Store Image
Create Thumbnail
Inform Subscribers
Store raw Image
Store Image Information
1
2
What could possibly go wrong?
• internal programming /business logic errors
• abnormalities (e.g. unexpected or invalid calls)
• lost or duplicated events
• high latency / timeouts
• security attacks (e.g. DoS/DDoS)
• personalized SLAs / usage plans / unexpected peaks of workload
• customer location changes
• …
„Run Code, not Servers“, they said!
„It will be fun“, they said
What, how and where should we test to …
• gain confidence in our code
• minimize risk of failures in production
Testing, the traditional way
Testing, the serverless way
„The biggest complexity is not within
the function itself, but in how it interacts
with other functions and services
(a.k.a. cloud components).“
Testing, the serverless way
Remember goals of testing: „minimize risk“
• configuration risk
• technical workflow risk
• business logic risk
• integration risk
Testing, the serverless way
Remember goals of testing: „minimize risk“
• configuration risk
• technical workflow risk
• business logic risk
• integration risk
Testing, the serverless way
Unit Testing
… for Serverless Functions
„Make sure that your business logic is
working as expected.“
• business logic errors
• coding errors
• …
Unit Testing
… for Serverless Functions
• seperation of logic and infrastructure
• mock dependencies
• jUnit, testNG, Mockito
• Jasmin, MochaJS, JEST
Integration Testing
… for Cloud Components
„Make sure that the integration of your
serverless function with all the other
cloud components works as expected.“
• wrong DynamoDB query
• unexpected response format
• ….
Integration Testing
… for Cloud Components
• dev/test components in the cloud*
• mock/fake cloud components**
• S3rver
• dynamodb-local
• kinesalite
• node-lambda
• fake-sns
• elasticmq* could become kind of expensive
** potential problem of self fulfilling prophecy
End-to-End Testing
… for User-Stories
„Make sure that chains of serverless
functions and cloud components work as
expected - inside the target environment.“
• wrong IAM permissions
• timeouts not set correctly
• not enough memory allocated
End-to-End Testing
… for User-Stories
• cloud test stages*
• local cloud emulation**
• SAM local (AWS)
• LocalStack (localstack.org)
• Serverless Offline (Serverless Framework)* could become kind of expensive
** emulate only part of the real world restrictions
Best Practices
#1 seperate business logic from infrastructure inside your functions
Testing Best Practices
AWS CloudOn-Premise
handler
logic
unit test candidate
e
i
u
integration test candidate
end-to-end test candidate
u
Infrastructure Business Logic
Infrastructure Business Logic
Business Logic Tests
#2 mock cloud infrastructure components of your functions
Testing Best Practices
AWS CloudOn-Premise
handler
logic
unit test candidate
e
i
u
integration test candidate
end-to-end test candidate
u
um
Infrastructure
AWS agnostic logger (log4j2)
fake infrastructure component (Context)
mock infrastructure component (Context)
#3 use local environment for functional testing (e.g. SAM local)
Testing Best Practices
AWS CloudOn-Premise
handler
logic
unit test candidate
e
i
u
integration test candidate
end-to-end test candidate
uvia SAM local
via SAM local
SAM
yaml
TEST
u
u
$ sam local invoke "Greetings" -e event-greeting.json --env-vars env.json
function name payload for function
$ sam local invoke "Greetings" -e event-greeting.json --env-vars env.json
function name payload for function
#WISSENTEILEN
#4 use local environment for trigger integration testing
Testing Best Practices
AWS CloudOn-Premise
handler
logic
unit test candidate
e
i
u
integration test candidate
end-to-end test candidate
uvia SAM local
via SAM local
SAM
yaml
TEST
u
u
i
i
$ sam local start-api –p 8080
$ sam local start-api –p 8080
$ sam local start-api –p 8080
#WISSENTEILEN
#5 use local „cloud“ components for basic integration testing
Testing Best Practices
AWS CloudOn-Premise
handler
logic
unit test candidate
e
i
u
integration test candidate
end-to-end test candidate
u
via DynamoDB local
via FakeS3 via SAM local
via SAM local
SAM
yaml
TEST
u
u
i
i
i
i
WARNING: local cloud
components can only proof
functional correctness but
not infrastructural
correctness like DLQs,
timeouts, throttling, SLAs, …
$ sam local generate-event [SERVICE] [OPTION]
Simulate Component Event to trigger Lambda
$ sam local genarte-event [SERVICE] [OPTION]
Simulate Component Event to trigger Lambda
Simulate Component triggered by Lambda
$ aws –endpoint-url=http://localhost:8000 dynamodb list-tables
$ java –jar DynamoDBLocal.-jar
Simulate Component triggered by Lambda
$ aws –endpoint-url=http://localhost:8000 dynamodb list-tables
Simulate Component triggered by Lambda
$ aws –endpoint-url=http://localhost:8000 dynamodb list-tables
#WISSENTEILEN
#6 use temporary integration cloud for partial integration testing
Testing Best Practices
AWS CloudOn-Premise
handler
logic
unit test candidate
e
i
u
integration test candidate
end-to-end test candidate
uvia SAM local
via SAM local
SAM
yaml
TEST
u
u
via DynamoDB local
via FakeS3
i
i
Temorary Intregration #Dev1
ii
INT
i
i
#WISSENTEILEN
#7 use permanent integration cloud for end-to-end testing
Testing Best Practices
AWS CloudOn-Premise
handler
logic
unit test candidate
e
i
u
integration test candidate
end-to-end test candidate
uvia SAM local
via SAM local
SAM
yaml
TEST
u
u
via DynamoDB local
via FakeS3
i
i
Permament IntregrationINT
e
e
e
e
i
i
„Are we
done?“
#WISSENTEILEN
Testing in Production
Remember goals of testing: „gain confidence“
• outages of cloud & cloud components
• outages of 3rd party apps you depend on
• bugs / problems related to scale
Testing in Production
Robust monitoring and error reporting
• logging
• tracing
• metrics
• alerting
Anticipation of disruption
and automated recovery!
Testing in Production
Chaos Engineering
• Inject small doses of failure into your system!
seperate business logic from infrastructure inside your functions
mock cloud infrastructure components of your functions
use local environment for functional testing (e.g. SAM local)
use local environment for trigger integration testing
use local „cloud“ components for basic integration testing
use temporary integration cloud for partial integration testing
use permanent integration cloud for end-to-end testing
REMEBER: Testing does not end in production!
Testing Summary
unit test
e
i
u
integration test
end-to-end test
e
i
i
i
u
u
i
Testing does not end
in production!

Contenu connexe

Tendances

FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...Vadym Kazulkin
 
Gojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applicationsGojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applicationsDaniel Zivkovic
 
Firebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile Apps
Firebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile AppsFirebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile Apps
Firebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile AppsDevathon
 
Developing Applications with the IoT Button - DevDay Los Angeles 2017
Developing Applications with the IoT Button - DevDay Los Angeles 2017Developing Applications with the IoT Button - DevDay Los Angeles 2017
Developing Applications with the IoT Button - DevDay Los Angeles 2017Amazon Web Services
 
How to build a social network on Serverless (AWS Community Summit)
How to build a social network on Serverless (AWS Community Summit)How to build a social network on Serverless (AWS Community Summit)
How to build a social network on Serverless (AWS Community Summit)Yan Cui
 
Writing less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiWriting less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiVadym Kazulkin
 
Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Vadym Kazulkin
 
20180111 we bde-bs - serverless url shortener
20180111   we bde-bs - serverless url shortener20180111   we bde-bs - serverless url shortener
20180111 we bde-bs - serverless url shortenerLuca Bianchi
 
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonVadym Kazulkin
 
Design and Develop Serverless Applications as Set-Pieces
Design and Develop Serverless Applications as Set-PiecesDesign and Develop Serverless Applications as Set-Pieces
Design and Develop Serverless Applications as Set-PiecesSheenBrisals
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Vadym Kazulkin
 
Whizlabs webinar - Deploying Portfolio Site with AWS Serverless
Whizlabs webinar - Deploying Portfolio Site with AWS ServerlessWhizlabs webinar - Deploying Portfolio Site with AWS Serverless
Whizlabs webinar - Deploying Portfolio Site with AWS ServerlessDhaval Nagar
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Vadym Kazulkin
 
How to build observability into a serverless application
How to build observability into a serverless applicationHow to build observability into a serverless application
How to build observability into a serverless applicationYan Cui
 
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryDevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryAmazon Web Services
 
Making Sense of Serverless Computing
Making Sense of Serverless ComputingMaking Sense of Serverless Computing
Making Sense of Serverless ComputingBruno Borges
 
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...TriNimbus
 
Microservices the Good Bad and the Ugly
Microservices the Good Bad and the UglyMicroservices the Good Bad and the Ugly
Microservices the Good Bad and the UglyAdrian Cockcroft
 
Transform Enterprise IT Infrastructure with AWS DevOps
Transform Enterprise IT Infrastructure with AWS DevOpsTransform Enterprise IT Infrastructure with AWS DevOps
Transform Enterprise IT Infrastructure with AWS DevOpsAmazon Web Services
 

Tendances (20)

FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
 
Gojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applicationsGojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applications
 
Firebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile Apps
Firebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile AppsFirebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile Apps
Firebase vs MongoDB Stitch vs AWS Amplify vs Azure Mobile Apps
 
Developing Applications with the IoT Button - DevDay Los Angeles 2017
Developing Applications with the IoT Button - DevDay Los Angeles 2017Developing Applications with the IoT Button - DevDay Los Angeles 2017
Developing Applications with the IoT Button - DevDay Los Angeles 2017
 
How to build a social network on Serverless (AWS Community Summit)
How to build a social network on Serverless (AWS Community Summit)How to build a social network on Serverless (AWS Community Summit)
How to build a social network on Serverless (AWS Community Summit)
 
Writing less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiWriting less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group Nairobi
 
Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022
 
20180111 we bde-bs - serverless url shortener
20180111   we bde-bs - serverless url shortener20180111   we bde-bs - serverless url shortener
20180111 we bde-bs - serverless url shortener
 
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
 
Design and Develop Serverless Applications as Set-Pieces
Design and Develop Serverless Applications as Set-PiecesDesign and Develop Serverless Applications as Set-Pieces
Design and Develop Serverless Applications as Set-Pieces
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
 
Whizlabs webinar - Deploying Portfolio Site with AWS Serverless
Whizlabs webinar - Deploying Portfolio Site with AWS ServerlessWhizlabs webinar - Deploying Portfolio Site with AWS Serverless
Whizlabs webinar - Deploying Portfolio Site with AWS Serverless
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
 
How to build observability into a serverless application
How to build observability into a serverless applicationHow to build observability into a serverless application
How to build observability into a serverless application
 
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryDevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
 
Making Sense of Serverless Computing
Making Sense of Serverless ComputingMaking Sense of Serverless Computing
Making Sense of Serverless Computing
 
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
 
Microservices the Good Bad and the Ugly
Microservices the Good Bad and the UglyMicroservices the Good Bad and the Ugly
Microservices the Good Bad and the Ugly
 
Serverless architectures
Serverless architecturesServerless architectures
Serverless architectures
 
Transform Enterprise IT Infrastructure with AWS DevOps
Transform Enterprise IT Infrastructure with AWS DevOpsTransform Enterprise IT Infrastructure with AWS DevOps
Transform Enterprise IT Infrastructure with AWS DevOps
 

Similaire à Surviving Serverless Testing: The ultimate Guide

Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Yan Cui
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Yan Cui
 
Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Yan Cui
 
Serverless in production, an experience report (NDC London, 31 Jan 2018)
Serverless in production, an experience report (NDC London, 31 Jan 2018)Serverless in production, an experience report (NDC London, 31 Jan 2018)
Serverless in production, an experience report (NDC London, 31 Jan 2018)Domas Lasauskas
 
Serverless in production, an experience report (NDC London 2018)
Serverless in production, an experience report (NDC London 2018)Serverless in production, an experience report (NDC London 2018)
Serverless in production, an experience report (NDC London 2018)Yan Cui
 
Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Yan Cui
 
AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAmazon Web Services
 
Serverless in production, an experience report (London js community)
Serverless in production, an experience report (London js community)Serverless in production, an experience report (London js community)
Serverless in production, an experience report (London js community)Yan Cui
 
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...Cloud Native Day Tel Aviv
 
Serverless in production, an experience report (microservices london)
Serverless in production, an experience report (microservices london)Serverless in production, an experience report (microservices london)
Serverless in production, an experience report (microservices london)Yan Cui
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience reportYan Cui
 
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017Codemotion
 
Serverless in production, an experience report (codemotion milan)
Serverless in production, an experience report (codemotion milan)Serverless in production, an experience report (codemotion milan)
Serverless in production, an experience report (codemotion milan)Yan Cui
 
AWS Lambda from the trenches (Serverless London)
AWS Lambda from the trenches (Serverless London)AWS Lambda from the trenches (Serverless London)
AWS Lambda from the trenches (Serverless London)Yan Cui
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017Amazon Web Services
 
Serverless in production, an experience report (BuildStuff)
Serverless in production, an experience report (BuildStuff)Serverless in production, an experience report (BuildStuff)
Serverless in production, an experience report (BuildStuff)Yan Cui
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenchesYan Cui
 
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Yan Cui
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAmazon Web Services
 
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)Amazon Web Services
 

Similaire à Surviving Serverless Testing: The ultimate Guide (20)

Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)
 
Serverless in production, an experience report (NDC London, 31 Jan 2018)
Serverless in production, an experience report (NDC London, 31 Jan 2018)Serverless in production, an experience report (NDC London, 31 Jan 2018)
Serverless in production, an experience report (NDC London, 31 Jan 2018)
 
Serverless in production, an experience report (NDC London 2018)
Serverless in production, an experience report (NDC London 2018)Serverless in production, an experience report (NDC London 2018)
Serverless in production, an experience report (NDC London 2018)
 
Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)
 
AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWS
 
Serverless in production, an experience report (London js community)
Serverless in production, an experience report (London js community)Serverless in production, an experience report (London js community)
Serverless in production, an experience report (London js community)
 
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
 
Serverless in production, an experience report (microservices london)
Serverless in production, an experience report (microservices london)Serverless in production, an experience report (microservices london)
Serverless in production, an experience report (microservices london)
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience report
 
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
 
Serverless in production, an experience report (codemotion milan)
Serverless in production, an experience report (codemotion milan)Serverless in production, an experience report (codemotion milan)
Serverless in production, an experience report (codemotion milan)
 
AWS Lambda from the trenches (Serverless London)
AWS Lambda from the trenches (Serverless London)AWS Lambda from the trenches (Serverless London)
AWS Lambda from the trenches (Serverless London)
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017
 
Serverless in production, an experience report (BuildStuff)
Serverless in production, an experience report (BuildStuff)Serverless in production, an experience report (BuildStuff)
Serverless in production, an experience report (BuildStuff)
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenches
 
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step Functions
 
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
 

Plus de OPEN KNOWLEDGE GmbH

Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!OPEN KNOWLEDGE GmbH
 
From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. OPEN KNOWLEDGE GmbH
 
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & CoReady for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & CoOPEN KNOWLEDGE GmbH
 
Shared Data in verteilten Architekturen
Shared Data in verteilten ArchitekturenShared Data in verteilten Architekturen
Shared Data in verteilten ArchitekturenOPEN KNOWLEDGE GmbH
 
Machine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.jsMachine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.jsOPEN KNOWLEDGE GmbH
 
It's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale NetzeIt's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale NetzeOPEN KNOWLEDGE GmbH
 
Shared Data in verteilten Systemen
Shared Data in verteilten SystemenShared Data in verteilten Systemen
Shared Data in verteilten SystemenOPEN KNOWLEDGE GmbH
 
Mehr Sicherheit durch Automatisierung
Mehr Sicherheit durch AutomatisierungMehr Sicherheit durch Automatisierung
Mehr Sicherheit durch AutomatisierungOPEN KNOWLEDGE GmbH
 
API-Design, Microarchitecture und Testing
API-Design, Microarchitecture und TestingAPI-Design, Microarchitecture und Testing
API-Design, Microarchitecture und TestingOPEN KNOWLEDGE GmbH
 
Supersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: QuarkusSupersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: QuarkusOPEN KNOWLEDGE GmbH
 
Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!OPEN KNOWLEDGE GmbH
 
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?OPEN KNOWLEDGE GmbH
 
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“OPEN KNOWLEDGE GmbH
 
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...OPEN KNOWLEDGE GmbH
 
Die Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von MicroservicesDie Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von MicroservicesOPEN KNOWLEDGE GmbH
 

Plus de OPEN KNOWLEDGE GmbH (20)

Nie wieder Log-Files!
Nie wieder Log-Files!Nie wieder Log-Files!
Nie wieder Log-Files!
 
Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!
 
From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud. From Zero to still Zero: The most beautiful mistakes going into the cloud.
From Zero to still Zero: The most beautiful mistakes going into the cloud.
 
API Expand Contract
API Expand ContractAPI Expand Contract
API Expand Contract
 
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & CoReady for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
 
Shared Data in verteilten Architekturen
Shared Data in verteilten ArchitekturenShared Data in verteilten Architekturen
Shared Data in verteilten Architekturen
 
Machine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.jsMachine Learning mit TensorFlow.js
Machine Learning mit TensorFlow.js
 
KI und Architektur
KI und ArchitekturKI und Architektur
KI und Architektur
 
It's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale NetzeIt's not Rocket Science: Neuronale Netze
It's not Rocket Science: Neuronale Netze
 
Shared Data in verteilten Systemen
Shared Data in verteilten SystemenShared Data in verteilten Systemen
Shared Data in verteilten Systemen
 
Business-Mehrwert durch KI
Business-Mehrwert durch KIBusiness-Mehrwert durch KI
Business-Mehrwert durch KI
 
Mehr Sicherheit durch Automatisierung
Mehr Sicherheit durch AutomatisierungMehr Sicherheit durch Automatisierung
Mehr Sicherheit durch Automatisierung
 
API-Design, Microarchitecture und Testing
API-Design, Microarchitecture und TestingAPI-Design, Microarchitecture und Testing
API-Design, Microarchitecture und Testing
 
Supersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: QuarkusSupersonic Java für die Cloud: Quarkus
Supersonic Java für die Cloud: Quarkus
 
Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!Hilfe, ich will meinen Monolithen zurück!
Hilfe, ich will meinen Monolithen zurück!
 
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
 
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
 
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
 
Serverless Survival Guide
Serverless Survival GuideServerless Survival Guide
Serverless Survival Guide
 
Die Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von MicroservicesDie Matrix: Enterprise-Architekturen jenseits von Microservices
Die Matrix: Enterprise-Architekturen jenseits von Microservices
 

Dernier

Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 

Dernier (20)

Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 

Surviving Serverless Testing: The ultimate Guide

  • 1. The utlimate SERVERLESS TESTING GUIDE #WISSENTEILEN THE PRACTICAL SKILLS YOU‘LL NEED TO TEST SERVERLESS by Lars Röwekamp a.k.a @mobileLarson
  • 2. ABOUT OPEN KNOWLEDGE Software development and IT consulting
  • 3. ABOUT ME Who am i? • CIO New Technologies • Enterprise & Mobile • Author, Speaker, Coach & Mentor • Snowboard & MTB Enthusiast • Traveller between the worlds Lars Röwekamp (a.k.a. @mobileLarson) LR
  • 5. Shouldn‘t be to complicated!- famous last words -
  • 6. Testing is about … gaining confidence in your code running as expected on a specific target platform.
  • 7. Testing is about … minimizing the risk that something unexpected will happen in production.
  • 8. „What does this mean in the context of Serverless?"
  • 10. #WISSENTEILEN “Run your business code highly-available in the cloud in response to events and scale without any servers to manage.“* *(AWS Lambda product description)
  • 11. #WISSENTEILEN “Run your business code highly distributed and event driven in a non transparent environment with no single point of control.“* *(my personal interpretation)
  • 12.
  • 13. The Road to the Cloud ... The Serverless Showcase
  • 14. AWS Cloud Use-Case: Upload Image upload image with additional information
  • 15. AWS Cloud Store raw Image 1 Use-Case: Upload Image upload image with additional information
  • 16. AWS Cloud Store raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 17. AWS Cloud AWS Step Functions workflow: Store Image Store raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 18. AWS Cloud AWS Step Functions workflow: Store Image Create ThumbnailStore raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 19. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 20. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 21. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 22. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 23. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2 Use-Case: Upload Image upload image with additional information
  • 25. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 26. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 27. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 28. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 29. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 30. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 31. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 32. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 33. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 34. AWS Cloud AWS Step Functions workflow: Store Image Create Thumbnail Inform Subscribers Store raw Image Store Image Information 1 2
  • 35. What could possibly go wrong? • internal programming /business logic errors • abnormalities (e.g. unexpected or invalid calls) • lost or duplicated events • high latency / timeouts • security attacks (e.g. DoS/DDoS) • personalized SLAs / usage plans / unexpected peaks of workload • customer location changes • …
  • 36. „Run Code, not Servers“, they said! „It will be fun“, they said
  • 37. What, how and where should we test to … • gain confidence in our code • minimize risk of failures in production
  • 39. Testing, the serverless way „The biggest complexity is not within the function itself, but in how it interacts with other functions and services (a.k.a. cloud components).“
  • 40. Testing, the serverless way Remember goals of testing: „minimize risk“ • configuration risk • technical workflow risk • business logic risk • integration risk
  • 41. Testing, the serverless way Remember goals of testing: „minimize risk“ • configuration risk • technical workflow risk • business logic risk • integration risk
  • 43. Unit Testing … for Serverless Functions „Make sure that your business logic is working as expected.“ • business logic errors • coding errors • …
  • 44. Unit Testing … for Serverless Functions • seperation of logic and infrastructure • mock dependencies • jUnit, testNG, Mockito • Jasmin, MochaJS, JEST
  • 45. Integration Testing … for Cloud Components „Make sure that the integration of your serverless function with all the other cloud components works as expected.“ • wrong DynamoDB query • unexpected response format • ….
  • 46. Integration Testing … for Cloud Components • dev/test components in the cloud* • mock/fake cloud components** • S3rver • dynamodb-local • kinesalite • node-lambda • fake-sns • elasticmq* could become kind of expensive ** potential problem of self fulfilling prophecy
  • 47. End-to-End Testing … for User-Stories „Make sure that chains of serverless functions and cloud components work as expected - inside the target environment.“ • wrong IAM permissions • timeouts not set correctly • not enough memory allocated
  • 48. End-to-End Testing … for User-Stories • cloud test stages* • local cloud emulation** • SAM local (AWS) • LocalStack (localstack.org) • Serverless Offline (Serverless Framework)* could become kind of expensive ** emulate only part of the real world restrictions
  • 50. #1 seperate business logic from infrastructure inside your functions Testing Best Practices AWS CloudOn-Premise handler logic unit test candidate e i u integration test candidate end-to-end test candidate u
  • 54. #2 mock cloud infrastructure components of your functions Testing Best Practices AWS CloudOn-Premise handler logic unit test candidate e i u integration test candidate end-to-end test candidate u um
  • 59. #3 use local environment for functional testing (e.g. SAM local) Testing Best Practices AWS CloudOn-Premise handler logic unit test candidate e i u integration test candidate end-to-end test candidate uvia SAM local via SAM local SAM yaml TEST u u
  • 60.
  • 61. $ sam local invoke "Greetings" -e event-greeting.json --env-vars env.json function name payload for function
  • 62. $ sam local invoke "Greetings" -e event-greeting.json --env-vars env.json function name payload for function
  • 63. #WISSENTEILEN #4 use local environment for trigger integration testing Testing Best Practices AWS CloudOn-Premise handler logic unit test candidate e i u integration test candidate end-to-end test candidate uvia SAM local via SAM local SAM yaml TEST u u i i
  • 64. $ sam local start-api –p 8080
  • 65. $ sam local start-api –p 8080
  • 66. $ sam local start-api –p 8080
  • 67. #WISSENTEILEN #5 use local „cloud“ components for basic integration testing Testing Best Practices AWS CloudOn-Premise handler logic unit test candidate e i u integration test candidate end-to-end test candidate u via DynamoDB local via FakeS3 via SAM local via SAM local SAM yaml TEST u u i i i i WARNING: local cloud components can only proof functional correctness but not infrastructural correctness like DLQs, timeouts, throttling, SLAs, …
  • 68. $ sam local generate-event [SERVICE] [OPTION] Simulate Component Event to trigger Lambda
  • 69. $ sam local genarte-event [SERVICE] [OPTION] Simulate Component Event to trigger Lambda
  • 70. Simulate Component triggered by Lambda $ aws –endpoint-url=http://localhost:8000 dynamodb list-tables $ java –jar DynamoDBLocal.-jar
  • 71. Simulate Component triggered by Lambda $ aws –endpoint-url=http://localhost:8000 dynamodb list-tables
  • 72. Simulate Component triggered by Lambda $ aws –endpoint-url=http://localhost:8000 dynamodb list-tables
  • 73. #WISSENTEILEN #6 use temporary integration cloud for partial integration testing Testing Best Practices AWS CloudOn-Premise handler logic unit test candidate e i u integration test candidate end-to-end test candidate uvia SAM local via SAM local SAM yaml TEST u u via DynamoDB local via FakeS3 i i Temorary Intregration #Dev1 ii INT i i
  • 74. #WISSENTEILEN #7 use permanent integration cloud for end-to-end testing Testing Best Practices AWS CloudOn-Premise handler logic unit test candidate e i u integration test candidate end-to-end test candidate uvia SAM local via SAM local SAM yaml TEST u u via DynamoDB local via FakeS3 i i Permament IntregrationINT e e e e i i
  • 77. Testing in Production Remember goals of testing: „gain confidence“ • outages of cloud & cloud components • outages of 3rd party apps you depend on • bugs / problems related to scale
  • 78. Testing in Production Robust monitoring and error reporting • logging • tracing • metrics • alerting Anticipation of disruption and automated recovery!
  • 79. Testing in Production Chaos Engineering • Inject small doses of failure into your system!
  • 80. seperate business logic from infrastructure inside your functions mock cloud infrastructure components of your functions use local environment for functional testing (e.g. SAM local) use local environment for trigger integration testing use local „cloud“ components for basic integration testing use temporary integration cloud for partial integration testing use permanent integration cloud for end-to-end testing REMEBER: Testing does not end in production! Testing Summary unit test e i u integration test end-to-end test e i i i u u i
  • 81. Testing does not end in production!