Testing apps with third-party integrations
Submitted by Ville Vahteri (@villevhtr) (proposing) on Friday, 17 May 2019
This is a proposal requesting for someone to speak on this topic. If you’d like to speak, leave a comment.
Section: Workshop Technical level: Intermediate
There are two different workshop options we have prepared for JSFoo. In both of them, we will build an express app with third-party integrations and examine best practices to run tests to it. Both workshops are highly interactive with more than 90% hands-on coding and are suitable for 15-50 attendees. The time required is at least 3 hours with a break but we can easily spend a full 6h day in either of the options. We can do both of them 3h + 3h, or one of them 3h/6h.
Option 1: Mocking the internet real-time
Every developer attending this conference will be using more and more third-party integrations, and are already losing (A) a lot of time mocking them and (B) a lot of time fixing bugs because they didn’t test them. This workshop will save time and give more confidence with third-party integrations.
In this workshop, we play in the same team with our audience. The workshop starts with building an app with multiple third-party integrations from zero. The traditional way to build the app would require declaring endless authentications from third-parties (time-consuming). We do it backwards: letting the audience write and test the code interactively with the “fake internet” (time-saving). In other words, while the audience is busy coding, we mock whatever data they need to get their app running real-time – be it a call to Salesforce, Facebook, Stripe, or any service provider’s API.
All in all, we introduce a new modern way for testing apps with third-party integrations without having to worry about declaring authentications or doing real calls during the build-up – without having to worry it will fail. Because it will, and that’s the point: these failures help us find the best way to test your app locally. The next time the participants build third-party integrations, they know how to build them the most secure, resilient, fast and sustainable way.
Option 2: Non-terministic / Stochastic testing
A lot of times developers don’t know how to write good tests (as they are so volatile). This workshop gives one new modern strategy to their testing toolbox, called stochastic testing. It will make them better programmers.
This workshop consists of two parts: battle and settle. In the first part, we (API owners) play against our audience (App builders). The participants will build an app with three integrations to third-party services which we will mock for them. They will start running their apps against our fake back-end. We consciously aim to crash their apps by changing the sent data – demonstrating how today’s software development relies on third-party integrations.
In the second part, we settle and try together discover the best strategies to build tests that wouldn’t fail even with the most volatile integrations. Here, we compare two methods: the classic deterministic testing and the modern non-terministic (or stochastic) testing. The first one made sense when you knew exactly how your code would execute which often fails in today’s integration economy. The second one suits today’s needs better and is expected to become the next big trend after unit-tests, integration tests and end-to-end tests. Our participants will walk away with a new tool in their testing toolbox.
Laptop, drinks and snacks.
Mike Solomon is the Founder and CEO of Meeshkan, a Helsinki-based DevOps company. He carries a PhD-level understanding of music, computer science and maths, derived from Stanford University, Queen’s University Belfast and the University of Florida. Before diving head first into ones and zeroes, he was a guest researcher at the University of Paris VI and artistic director of the Ensemble 101.
Mike’s passion shifted from music to machine learning while working at the IRCAM as a computer music designer. First, he tried everything between programmatic composing to building apps and spoken installations. He saw numerous pain points in the ML pipeline and founded Meeshkan in 2017 to relieve those. Since then, Meeshkan has continued to help developers lead easier lives and expanded to other areas of DevOps. Currently, they are tackling the difficulties in testing third-party integrations with their newest product called unmock.
When not working, Mike plays in a Finnish chamber music band and admires the testing mentality of computer musicians. To practice testing and failing in new environments, Mike also does stand-up comedy. Thanks to the on-stage hobbies, his presentational skills and random metaphors make him a good workshop host and speaker.