$30 off During Our Annual Pro Sale. View Details »

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.

Vladik Khononov

October 17, 2019
Tweet

More Decks by Vladik Khononov

Other Decks in Programming

Transcript

  1. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    TESTING
    SOFTWARE ARCHITECTURE

    View Slide

  2. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    @vladikk
    vladikk.com
    DoiT International

    View Slide

  3. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  4. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  5. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  6. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  7. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  8. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    Design Patterns
    Libraries / Frameworks
    Infrastructural components
    Programming languages

    View Slide

  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

    View Slide

  10. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  11. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    So#ware Architecture
    Tes1ng So#ware Architecture
    Automa1on Architectural Tests

    View Slide

  12. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    SOFTWARE

    ARCHITECTURE

    View Slide

  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

    View Slide

  14. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    …but it’s hard!!!
    SOFTWARE SOLVES PROBLEMS
    GOOD DESIGN SUPPORTS THE BUSINESS

    View Slide

  15. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    Infrastructure
    Databases
    Architectural styles
    Frameworks
    Languages
    Methodologies

    View Slide

  16. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    THE GOAL OF SOFTWARE ARCHITECTURE
    IS TO MANAGE COMPLEXITY!

    View Slide

  17. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    1. Component level
    2. System level
    3. Implementation level
    Complexity Management

    View Slide

  18. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    Local
    Complexity

    View Slide

  19. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    Global
    Complexity

    View Slide

  20. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    Global
    Complexity

    View Slide

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

    View Slide

  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

    View Slide

  23. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    Big design upfront
    No design
    Architect
    Evolutionary architecture

    View Slide

  24. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    ENTROPY -
    GRADUAL DECLINE INTO DISORDER

    View Slide

  25. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  26. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  27. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  28. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    TESTING
    SOFTWARE

    ARCHITECTURE

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  33. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    ARCHITECTURE = BOUNDARIES DESIGN
    GOOD ARCHITECTURE:
    GOOD BOUNDARIES
    BAD ARCHITECTURE:
    BAD BOUNDARIES

    View Slide

  34. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    BAD BOUNDARIES = EVERYBODY SUFFERS

    View Slide

  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

    View Slide

  36. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    Global
    Complexity

    View Slide

  37. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  38. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    QA Engineers
    Defects caused by logic duplication
    Regression testing in-proportionally long

    View Slide

  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

    View Slide

  40. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    OperaAons
    No DevOps culture
    Big releases
    Rare deployments
    Complex configurations for components

    View Slide

  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

    View Slide

  42. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    GOOD ARCHITECTURE
    REQUIRES SHARED OWNERSHIP

    View Slide

  43. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    AUTOMATING
    ARCHITECTURAL TESTS

    View Slide

  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

    View Slide

  45. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  46. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  47. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  48. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  49. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  50. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  51. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  52. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  53. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    EVOLUTION DRIVERS

    View Slide

  54. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    ORGANIZATIONAL CHANGE DRIVERS
    SMALL:
    AD-HOC
    INTEGRATION
    LARGE:
    FORMAL
    INTEGRATION

    View Slide

  55. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    BUSINESS STRATEGY CHANGE DRIVERS
    SUPPORTING CORE BUSINESS

    View Slide

  56. vladikk doit-intl.com
    Join at slido.com with #testcon2019
    WRAP UP

    View Slide

  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

    View Slide

  58. vladikk doit-intl.com
    Join at slido.com with #testcon2019

    View Slide

  59. https://bit.ly/2ptJ5fS
    THANK

    YOU!
    @vladikk
    vladikk.com
    https://bit.ly/31nSD9c
    http://careers.doit-intl.com

    View Slide