Software Architecture Metrics
by Christian Ciceri, Dave Farley, Neal Ford, Andrew Harmel-Law, Michael Keeling, Carola Lilienthal, João Rosa, Alexander von Zitzewitz, Rene Weiss, Eoin Woods
Chapter 2. The Fitness Function Testing Pyramid: An Analogy for Architectural Tests and Metrics
Fitness functions, a concept borrowed from evolutionary computing, are a concise method that can also be used to define software system metrics. This chapter will show you how fitness functions can help you define metrics tailored to your system and use them to improve your system’s architecture, whether you’re currently building a new system or improving an existing one. Combining fitness functions and metrics with the testing pyramid concept can help you define, prioritize, and balance your metrics and enables you to measure progress toward your objective.
Fitness Functions and Metrics
In their book Building Evolutionary Architectures, Neal Ford, Rebecca Parsons, and Patrick Kua define a fitness function as “an objective function used to summarize how close a prospective design solution is to achieving the set aims.”1 Such a function usually outputs a discrete value, which is the metric you’re trying to achieve or improve. To know whether you’ve reached your goal, you need a test or verification mechanism that measures the desired metric. Ideally, you’ll want this to be automated, but that’s not a requirement for fitness functions!
I like the notion of using fitness functions to create target metrics, since they are very flexible. You can also use fitness functions to describe and integrate typical metrics (such as code coverage or code structure metrics like cyclomatic ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access