Testing Software Architecture

Testing Software Architecture

If anything, the Agile, Lean, and DevOps movements have proven that software architecture is not a “one man show”. Instead, in order to succeed, software design is a group effort that requires involvement from different stakeholders. In this session I’d like to talk about the testing aspect of software architecture and design.
We will see what exactly is this “important stuff”, that we use to call software architecture; what are its goals, and what differentiates a good architecture from a bad one? Next, we will discuss how to watch over a system’s architecture during the various stages of its development:
* The differences between under and over-engineering
* How to identify forming of a “big ball of mud” in early stages; and
* What are the symptoms of an exhausted architecture that is breaking under its own weight
Ultimately, I’ll demonstrate how such tests can be automated using static code analysis tools.

B90ab53ba7cf16ed1a4bb679cc6751d7?s=128

Vladik Khononov

October 17, 2019
Tweet

Transcript

  1. 8.

    vladikk doit-intl.com Join at slido.com with #testcon2019 Design Patterns Libraries

    / Frameworks Infrastructural components Programming languages
  2. 9.

    vladikk doit-intl.com Join at slido.com with #testcon2019 Adapting to changes

    in business Adapting to changes in technology Testing out assumptions Evolutionary architecture
  3. 11.
  4. 13.

    vladikk doit-intl.com Join at slido.com with #testcon2019 "Architecture is about

    the important stuff, whatever that is”
 - Ralph Johnson “Software architecture is those decisions which are
 both important and hard to change” 
 - Martin Fowler
  5. 14.

    vladikk doit-intl.com Join at slido.com with #testcon2019 …but it’s hard!!!

    SOFTWARE SOLVES PROBLEMS GOOD DESIGN SUPPORTS THE BUSINESS
  6. 16.

    vladikk doit-intl.com Join at slido.com with #testcon2019 THE GOAL OF

    SOFTWARE ARCHITECTURE IS TO MANAGE COMPLEXITY!
  7. 17.

    vladikk doit-intl.com Join at slido.com with #testcon2019 1. Component level

    2. System level 3. Implementation level Complexity Management
  8. 22.

    vladikk doit-intl.com Join at slido.com with #testcon2019 "System design …

    is inherently about boundaries - what’s in, what's out, what spans, what moves between, and about tradeoffs. It reshapes what is outside, just as it shapes what is inside.” - Ruth Malan
  9. 23.
  10. 29.

    vladikk doit-intl.com Join at slido.com with #testcon2019 FUNCTIONAL TESTING: UNIT,

    INTEGRATION, END-TO-END NON-FUNCTIONAL TESTING: PERFORMANCE, STRESS, SECURITY, USABILITY, ETC DESIGN TESTING: LOCAL AND GLOBAL COMPLEXITIES OF THE DESIGN
  11. 30.

    vladikk doit-intl.com Join at slido.com with #testcon2019 Good Architecture Easy

    to navigate Easy to contribute Easy to change Delivers business goals
  12. 31.

    vladikk doit-intl.com Join at slido.com with #testcon2019 Bad Architecture Hard

    to navigate Hard to contribute Hard to change Under/over engineered Big ball of mud
  13. 32.

    vladikk doit-intl.com Join at slido.com with #testcon2019 "A Big Ball

    of Mud is a haphazardly structured, sprawling, sloppy, duct-tape-and-baling-wire, spaghetti-code jungle. These systems show unmistakable signs of unregulated growth, and repeated, expedient repair. Information is shared promiscuously among distant elements of the system, often to the point where nearly all the important information becomes global or duplicated.” - Joseph Yoder
  14. 33.

    vladikk doit-intl.com Join at slido.com with #testcon2019 ARCHITECTURE = BOUNDARIES

    DESIGN GOOD ARCHITECTURE: GOOD BOUNDARIES BAD ARCHITECTURE: BAD BOUNDARIES
  15. 35.

    vladikk doit-intl.com Join at slido.com with #testcon2019 So9ware Engineers Hard

    to add new functionality Hard to change existing functionality Impossible to unit test
  16. 38.

    vladikk doit-intl.com Join at slido.com with #testcon2019 QA Engineers Defects

    caused by logic duplication Regression testing in-proportionally long
  17. 39.

    vladikk doit-intl.com Join at slido.com with #testcon2019 Database Administrators Multiple

    sources of truth Inconsistent data that has to be fixed manually Lack of transactions due to design constraints
  18. 40.

    vladikk doit-intl.com Join at slido.com with #testcon2019 OperaAons No DevOps

    culture Big releases Rare deployments Complex configurations for components
  19. 41.

    vladikk doit-intl.com Join at slido.com with #testcon2019 OperaAons No DevOps

    culture Big releases Rare deployments Complex configurations for components So9ware Engineers Hard to add new functionality Hard to change existing functionality Impossible to unit test QA Engineers Defects caused by logic duplication Regression testing in-proportionally long Database Administrators Multiple sources of truth Inconsistent data that has to be fixed manually Lack of transactions due to design constraints BAD BOUNDARIES = EVERYBODY SUFFERS
  20. 44.

    vladikk doit-intl.com Join at slido.com with #testcon2019 StaAc Code Analysis

    Analyze the codebase Query the code’s health Flexible health rules definitions Build pipeline integrations
  21. 54.
  22. 57.

    vladikk doit-intl.com Join at slido.com with #testcon2019 Software architecture manages

    complexity Local and global complexities Everyone suffers if module boundaries are ineffective Look for symptoms of bad boundaries. And react! Use static code analysis tools to control codebase evolution Look for chages in the organization structure and business strategies that affect software design