Katie Fox – UKG Inc.
Unit tests are the foundation of the test pyramid, but are commonly seen as a developer’s obligation and not as a tester’s secret weapon for risk-based testing analysis and automation. I recently interviewed candidates for a quality engineer position, and the most common description was, “they’re tests developers write.” I heard that enough to question my own contrary opinion, how I’d arrived at those thoughts, and how I would encourage others to view them differently: as simple, powerful tests that increase in value with more visibility and more attention to detail in their creation.
Well-written unit tests provide a concise way to understand the changes for a story without reading the entire source code. Applying risk-based principles and factoring in the areas of change could either allow for a reduction in testing scope, or it could reveal new areas that weren’t initially considered. It can also inform where test scenarios have already been partially or fully automated and thereby prevent duplicated effort and bloat. If the “whole team owns quality”, and “everyone contributes to automation”, then developers and test engineers should be familiar with all levels of automated tests that ensure such quality. In a team’s effort to shift left, let’s also shift our focus to improving and using the leftmost-written automation.