Front End Testing with GitHub Actions

A presentation at NDC Sydney 2024 in in Sydney NSW, Australia by Amy Kapernick

While testing is important, we’d much prefer if we didn’t have to think about it, if it just happened like magic.

We know we have to write tests to make sure the buttons can be clicked, the data can be received and the page continues to look the way it should, but once the tests are written, are they actually being run?

We’ve been integrating our end to end tests to ensure they run on every commit or every pull request, but front end tests require a live version of our website to run tests, you can read CSS code in a pull request but that doesn’t tell you if it’s affecting the website the way you intended it to. Thankfully GitHub Actions makes it easy to fix this, to get a live version of our website and run our front end tests against it before the code gets merged and deployed.

Together we’ll build out an action workflow (that can be integrated with your existing end to end tests if you’ve got them), write some front end tests and put together a bulletproof continuous deployment pipeline.

Resources

The following resources were mentioned during the presentation or are useful additional information.