

This means you can open a real browser window, navigate to the site being tested, and perform actions on the given page. Puppeteer tests can run in a "head-full" state. Puppeteer has a few configuration options that make it really awesome to use for writing and validating tests. The end result is that the user will never get to feel the greatness of your code. The mantra that we try to follow is that it does not matter if your code performs perfectly if the button the user should press is hidden due to some CSS quirk. This kind of test should help fill the blank space between "static" tests - such as unit tests, where you usually don't bootstrap the entire application - and component testing, which usually runs against a single component (or a service in a micro-service architecture).īy simulating user interaction you get to test the experience of using your application or service in the same way a regular user would experience it. E2E tests simulate a real user, performing actions on the screen. End to end testingĮnd to end (or E2E) tests are different from other types of automated tests. Both reasons led me to choose puppeteer, and so far I'm not regretting it. Setting up cypress is quite a bit more difficult (although in our world nothing is impossible). The first is that it is written and maintained by the folks behind the Chrome dev tools, so I'm guaranteed a life-time of support (until Chrome dies out, which is not in the near future), and it is really easy to work with.Īnother reason is that at home I'm working on a windows laptop with WSL (on which I'm running zshell with oh-my-zsh). I chose puppeteer as my end-to-end framework for several reasons. I encourage you to read his article as well. I do want to give a shout-out to Nick Taylor, who published his article on the subject, and laid the ground work for my efforts here. The whole thing only took roughly two days of intermittent work, and I think the results are quite awesome. It also integrates beautifully with any Github repository you already have. In this guide I'll show you how to create such a pipeline yourself.Īs my CI platform, I chose Github Actions, as it is super easy to work with. My main goal was to allow automatic dependency updates using Dependabot. Lately I've added continuous integration to my blog using Puppeteer for end to end testing.
