Designing a Test Strategy for Serverless Applications

Luke Hedger

The LEGO Group

National DevOps Conference - Sept 2022

Context

Attributes of a serverless app

  • EDA
  • Managed services (or, SaaS)
  • Async/Latency
  • Distributed

Serverless Test Square of Balance 🟨 (or TORD)

  • Test - small tests, quick to run

  • Observe - alerts, tracing, logs, synthetics

  • Recover - fault tolerance, replays

  • Deploy - fixes, delivery pipeline

     

Shared resp model for testing

  • Don’t test what you can’t fix - flaky tests often due to things out of our control

Case study architecture API -> Lambda -> EventBridge -> Lambda -> DynamoDB

Analyse failure modes of architecture

Lambda function unit test, including AWS SDK mock/spy

Integration tests

Critical path functional tests (public API) - Jest + got

Synthetic monitoring

Conclusion

Made with Slides.com