Automation /

Regression Testing

Making sure things don't break when they're changed.

Previous: End to End Testing Next: Performance Testing

Writing software is all about moving forwards. On the whole people who use a website, and people who commission you to build a website, understand that writing website software is complicated and sometimes things won't work. A few bugs is the acceptible price of complexity. What definitely isn't acceptible though is software that worked being broken by a change. These bugs are a sign that you're going backwards, and they're called regressions.

Regression bugs are essentially the worst of whatever bugs you might find in your code. They don't have any greater impact than any other sort of problem, but reputationally they're a sign that you have a broken development process. If there's anything that'll make people think you're not working well it's a regression.

The cause of a regression might not necessarily even come down to something you wrote. An upgraded dependency, especially moving from one major version to a newer one, could break your code ("version pinning" is a separate topic to testing, but it's worthwhile Googling it if you're not sure). A front end change like a user updating their browser to the latest version could break your application. Ideally you need to be running tests against multiple versions of browsers, and checking the latest updates as soon as they're available. Sooner if possible. Test against Chrome Canary and Firefox Aurora.

All this said, fortunately the actual process of regression testing is simple. It's just a matter of adding the right tests.

There's much more content coming soon(ish). If you're interested in reading it as it's added, please subscribe to my email updates. You won't get many emails - it'll only be one a month at most, and your email address will never be shared with any third parties. I would recommend adding something like "+testtheweb" to your email name, eg onion2k+testtheweb@gmail.com, to make filtering easy, and to be sure that your address has not been shared. It's supported on gmail, hotmail and many other email providers.

Many thanks to Tinyletter for their awesome (and free) service.

powered by TinyLetter

Previous: End to End Testing Next: Performance Testing