Integration testing a cloud-native application with JavaScript

Key takeaways
  • Infrastructure as code is key, because configuration of cloud-native services are part of the solution
  • How BDD can be used to write re-usable test instructions
  • to write tests that behave like real users (retry if failed multiple times) instead of programming shortcuts, because this will give better information to system design
  • to use “real” test doubles backed by queues to monitor outcome of test cases

In this talk I will take you through the challenge of testing a cloud-native application that uses MQTT (a pub/sub protocol), webhooks and REST to interact with IoT devices on top of AWS. It uses services which cannot be run on a developers machine for testing, so I needed to develop a test setup which enables us to continuously test against real services. On top of that I wanted to use a BDD approach to write the tests to make our progress in the project self-documenting and the test immune against effects of big refactorings, which provides an extra set of challenges since these tests are written in a serial manner, which does not fit the async execution of the real solution. I’ll show how all this is done using JavaScript and that this is is not only an interesting challenge but uses tests that behave like real users, and that there is an Ops person in all of us.

Markus Tacker

Sharpen your skills. Explore

Pick your topics of interest below
Large Spinner

Partners

Köld
Partners, Sticker Mule

Best companies

Best companies, Qlik
Best companies, VP Securities
Best companies, Telavox
Best companies, EDP
Best companies, Avensia
Best companies, Citerus
Best companies, Avega Group
Best companies, Handelsebanken
Best companies, Play'n'GO
Best companies, Capgemini
Best companies, Trustly
Best companies, Danskebank
Best companies, Lantmäteriet
Best companies, ÅF