Testing Serverless Applications

Upcoming

22 June 2020 Book Now

Upcoming

22 June 2020 Book Now

Learn useful testing approaches for serverless apps in this 2 week course taught by Slobodan Stojanović & Aleksandar Simovic.

According to many polls, testing serverless applications and fear of the cloud vendor lock-in are among the top five challenges organisations are facing when adopting serverless. We often hear that using serverless effectively requires a mind shift. But what does that mean? Do we need new tools and strategies for testing serverless applications, or can we use existing tools we already use for our non-serverless applications?

We will learn which approach to take on testing serverless applications, how to prepare our app for testing, and how to write tests. We'll start with unit tests, then gradually learn how to write integration and end-to-end tests. In addition, in this workshop we'll also learn how to write testable serverless functions without sacrificing our organisation's speed and agility. To accomplish that, we'll use the tools that we are using today, and an architecture that we probably heard of before: hexagonal architecture, also known as "Ports and Adapters".

Finally, we'll see how this new architecture will also help us to fight vendor lock-in.

Schedule

Week 1

Intro to testing serverless applications [Lecture ]
Testing pyramid vs. Serverless testing pyramid [Lecture]
Unit tests [Lecture + Demo + Exercise]
Writing testable serverless functions - introduction to hexagonal architecture [Lecture + Demo + Exercise]

Week 2

Integration tests [Lecture + Demo + Exercises]
How to decide what to test [Lecture + Exercise]
Using hexagonal architecture in a way that does not slow you down [Lecture + Demo + Exercise]
End-to-end tests [Lecture + Demo + Exercise]
How hexagonal architecture helps you fight vendor lock-in [Lecture]

Structure

The class takes place over 2 weeks, with an average time committment of 4-5 hours per week. Each week will follow this structure:

Mondays: Lectures and exercises released via the Homeschool platform; you'll need to be logged in to access this.

All week: Peer chat and exercise sharing via Discord server with your instructor and class cohort.

Mondays, 10am and 10pm CEST: Live recap and Q&A sessions (~1 hour) with the instructors. Exercise answers released. The Q&A session is streamed within the Homeschool platform, with questions submitted via Discord. All questions are logged and a timecode for the start of the answer is shared on the platform after the stream ends. The Q&A sessions are viewable permanently afterwards, in case you miss them.

All course materials are permanently available on your Homeschool account after they've been released.

What you'll need...

A brief list of what you will need to do this class:

  • A basic understanding of Amazon Web Services (AWS) and how it works.
  • A basic experience with serverless on AWS. Creating and running a few Lambda functions is enough.
  • A laptop with a terminal emulator. For example, Mac Terminal, iTerm2, Microsoft Terminal, or any other.
  • A code editor or IDE. For example, VS Code, Sublime, Vim, Emacs, Visual Studio, IntelliJ, etc.
  • An active AWS account. All examples will work on the AWS Free Tier if you have a new account.
  • Previous experience with Node.js, as most of the examples will be in Node.js, though it is not required.

Who it's for...

If you've ever built and run at least one serverless function, there's a big chance that you read about testing serverless applications or tried to test your code. This workshop is built to help you with testing serverless apps and writing testable serverless functions. It is especially helpful for:

Backend Engineers whose primary focus is building business logic and managing APIs and data processing pipelines. Particularly useful for engineers who are planning a migration to serverless or running part of the application on serverless.

Fullstack engineers who have to dabble with both frontend and backend technologies and who increasingly need to be fluent with AWS and its serverless offerings.

Frontend engineers experienced with testing using one of the popular testing frameworks (such as Jest, Jasmine, or Mocha), who want to learn the basics of serverless.

Tech Lead, Architects, and Engineering Managers who want to get a deeper understanding of testing serverless applications so they can better help their teams make the best architectural decisions and solve architectural challenges they face.