Headless UI testing with Chrome and Puppeteer
Details
For our first meetup of 2018 we have Richard Wilde taking us through Headless UI testing with Chrome and Puppeteer.
I’d like to get things going again so if anyone else fancies giving a talk or running a workshop please let me know. £3 donations for Deepspaceworks are greatly appreciated in return for which you’ll get tea, biscuits and a beer in the pub afterwards. Looking forward to catching up.
------------------------------------------------------------------------------------------------
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. We 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 Richard Wilde
Richard started programming during the home computing era with a ZX81. He has been running his own software company called wildesoft.net since 2004 and has a lot of experience delivering Microsoft solutions for all aspects of businesses. He is also the co-founder of Smart Devs a user group based in Hereford. He hangs around on twitter @rippo
Links:
https://github.com/GoogleChrome/puppeteer
https://twitter.com/rippo
https://www.meetup.com/Smart-Devs-User-Group/
http://www.wildesoft.net
