Headless UI testing with Chrome and Puppeteer

By rippo Richard Wilde

Talk Abstract:

Wouldn't it be nice to be able to UI test your code changes before you check into source! Unit testing helps us when writing any sort of application, however we often end up writing unit tests for small pieces of logic that don't really matter and sometimes miss out on the bigger picture. As a developer we tend to shy away from Web UI testing as the feedback loop is just too slow.

In this demo led presentation we will take a look at a toolset that gives us far faster feedback. I will cover :-

  • how to get up and running
  • show how we can take screen grabs and generate PDF's
  • show some basic testing scenarios using a SPA (including image comparisons)
  • show how the page object pattern is useful

Welcome to Chrome(ium) and Puppeteer!

Puppeteer is a Node library which provides a high-level API to control headless Chrome (AKA Chromium) over the DevTools Protocol. It can also be configured to use (non-headless) Chrome.

About rippo Richard Wilde

Richard started programming during the home computing era with a ZX81. He has been running his own software company called since 2004 and has a lot of experience delivering Microsoft based solutions for all aspects of businesses. He is also the co-founder of Smart Devs a user group based in Hereford. He also hangs out on twitter @rippo