The role of automated testing at the heart of modern development and operations is accepted as a given. However, the traditional approach to testing, which cleaves it drastically into two—developer-focused unit testing and separate (and, alas, often only semi-automated) integration testing—is not optimal in the modern, fluid world of DevOps.
Nothing short of full automation is suitable for continuous integration; any “testing” requiring humans has a drastically different place in the continuum of development and deployment and should best be called by a completely different name like quality assurance. Within the realm of fully automated testing, the best approach, just as for other kinds of software, is highly modular.
Alex Martelli highlights the proper design of components meant for testing purposes and explains how such a design lets you compose multiple, layered testing suites that span the gamut from unit tests meant to run all the time during development to full-fledged end-to-end tests of whole systems—and, crucially, the often-neglected intermediate layers, bridging the thoroughness of end-to-end tests with unit tests’ ability to pinpoint the location of any problems that emerge, enabling rapid fixes of most such problems.
Alex also discusses the use of modular, layered testing components to validate software refactoring (all the way to deep rearchitecting of a system) and (when deployed in a load-testing arrangement) identify and validate software (and architectural) optimizations.
Alex Martelli is a senior staff engineer at Google. Alex is the author of Python in a Nutshell and coeditor of the Python Cookbook. He is a PSF member and won the 2002 Activators’ Choice Award and the 2006 Frank Willison Award for contributions to the Python community. You can read some of his publications here and
watch some of his past presentations here.
©2017, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • firstname.lastname@example.org