Automated testing strategies: a software engineer’s competitive edge
Hack Chat with BookBub
“As recent as a decade ago, comprehensive testing wasn’t as commonly demanded. Now the lines between ‘software engineer’ and ‘test engineer’ are converging. Knowing how to write tests definitely ups your value as an engineer.” — Graham Babbitt and Sonja Peterson, Software Engineer Tech Leads at BookBub
Suppose we’re building a search functionality and want to make sure it works. To test it, a user might visit the site, type into the search bar, click on a corresponding link, and confirm that the right content populates the page.
For BookBub, a platform enabling millions of readers to discover content they love, and publishers and authors to identify the comprehensive audience who’ll love their content, relying on manual testing is a severe limitation. In the first Hack Chat of 2018, we delve into how BookBub’s software engineering team is leveraging automated testing to transform the way the publishing industry operates, and consider the career advancement edge that Fellows might gain by incorporating this skillset into their repertoires.
Venturing beyond manual testing limits…
At a big enough volume, the tenacity of the tester’s attention span is the best defense against the monotony of manual testing, and unfortunately, it trends towards a losing battle even when performed by the most conscientious tester. Building automated tests require investment of time up front, but the rewards are multifaceted, including:
- Increased testing capacity by simulating tens, hundreds, thousands of interactions, in parallel or repeating as needed.
- Faster feedback loop allowing developers to fix bugs and ship code without waiting through a lengthy QA process
- Protection against breaking existing code when making changes that could have unexpected side effects
Automated tests not only create a consistency, and a precision, for executing the same steps every time, but also simultaneously logs detailed results. Bonus: less time spent on assessing the accuracy of manual tests = more time to dedicate to unique features that differentiates one product from the next.
…to hone individual coding skills…
Continuous integration and continuous deployment is crucial because if automated tests aren’t reliable as the application evolves, it’s pointless to build them in the first place. The practice of designing code through the lens of how to test it effectively establishes guidelines for engineers to make good design choices from the ground up.
“Tests are something that use your code, so if it’s hard to write tests it’s probably also hard to use your code in other contexts.”
Case in point — understanding and constructing a “good” automated test maximizes avoidance of, or at least the ability to differentiate between, results of a “flaky” test — i.e. a test that fails randomly — vs. an actual discovery of bugs.
…towards collaborative productivity.
It takes constant upkeep, both technical and organizational to keep a large test suite working smoothly. With the growth of a test suite, more and more variables can lead to flaky tests, and as a test suite scales, collaborative documentation of common flakes and solutions minimizes net costs — in time, money, and user experience.
Bottom line — In a increasingly crowded digital landscape, efficiency and convenience go a long way towards establishing brand loyalty, and the innovation economy values talent who can synchronize those attributes toward a quality end product.