How to Write Browser-Based Tests That AREN’T a Waste of Time


Imagine this: you’ve written a whole suite of tests that open up a browser and run through your entire web application, entering text and clicking on buttons just like a real user would. Even though they may take a while to write and to run, you’re confident that your browser-based test suite does a pretty good job of verifying the whole system. Quality is great and users are happy! 
Then you need to make some UI change which breaks a dozen tests and you just don’t have time to fix them all… so you ignore them and promise yourself you’ll go back and fix them when you have the time (which you never do). 
Then it happens AGAIN, resulting in a dozen more ignored tests. 
THEN… Well, you get the point.

Not too long ago, experiences like that caused me to completely write off browser-based automated tests as flaky and a huge waste of time. That is, until I realized the main reason that my tests were so flaky is that I was writing them all wrong! In this presentation we’ll look at a subtle but powerful approach to browser-based testing that abstracts your test code from the details of your UI, making your tests easier to maintain by keeping you from having to rewrite them all the time, and bringing back the value of having browser-based automated tests again!

Jess Chadwick

Jess Chadwick is a Lynda.com/LinkedIn Learning author, host of the Static Void Podcast, founding board member of the TechBash developer conference, and dev manager and architect at one of the two largest banks in the US. But, more importantly, he’s a coder with over 20 years of experience of writing and actually shipping software with a variety of teams in a variety of environments from 2-person startups to 200,000-person enterprises.