[{"data":1,"prerenderedAt":212},["ShallowReactive",2],{"/blog/architecture-tests-are-the-missing-layer-in-automation":3,"surround":207},{"id":4,"title":5,"body":6,"canonical":189,"date":190,"description":191,"extension":192,"featured":193,"image":194,"meta":195,"navigation":196,"ogimage":194,"path":197,"provider":194,"published":196,"seo":198,"stem":199,"tags":200,"url":194,"__hash__":206},"blog/blog/architecture-tests-are-the-missing-layer-in-automation.md","Architecture Tests Are the Missing Layer in Automation",{"type":7,"value":8,"toc":178},"minimark",[9,13,18,21,24,37,40,43,46,49,66,69,73,76,96,99,103,106,109,115,118,127,130,133,145,148,151,155,158,162,165,168,172,175],[10,11,12],"p",{},"Why Your Automation Tests Deserve Architecture Tests",[14,15,17],"h3",{"id":16},"problem-statement","Problem Statement",[10,19,20],{},"Most engineering teams advocate strong architectural designs for backend systems. Concepts like MVC, DDD, layered architecture, and SOLID principles are well-established and widely enforced.",[10,22,23],{},"To enable fast delivery, DevEx and Platform teams often provide boilerplate templates to help engineers bootstrap new projects quickly. For example:",[25,26,27,31,34],"ul",{},[28,29,30],"li",{},"A backend engineer can set up a Spring Boot service aligned with MVC or DDD.",[28,32,33],{},"An SDET can spin up a UI automation framework using Playwright or Selenium following the Page Object Model.",[28,35,36],{},"An SDET can create an API automation framework with RestAssured + Java aligned to KISS or SOLID.",[10,38,39],{},"In theory, these templates should keep everyone aligned to globally accepted structures.",[10,41,42],{},"But in reality, context varies, engineer preferences differ, and architecture drifts fast.",[10,44,45],{},"Over time, as the codebase grows, developers and SDETs unintentionally violate these architectural rules. Not out of negligence, but because there is no system enforcing them.",[10,47,48],{},"The result:",[25,50,51,54,57,60,63],{},[28,52,53],{},"Fragile Page Objects",[28,55,56],{},"Test classes accessing WebDriver directly",[28,58,59],{},"Business logic leaking into test code",[28,61,62],{},"Inconsistent naming and folder organization",[28,64,65],{},"Tangled dependencies and hidden coupling",[10,67,68],{},"A test suite that becomes impossible to maintain.",[14,70,72],{"id":71},"the-solution-architecture-as-executable-tests","The Solution: Architecture as Executable Tests",[10,74,75],{},"Fortunately, we now have tools that allow us to enforce architecture directly in automated test projects, the same way we enforce code quality and unit tests.",[25,77,78,88],{},[28,79,80,87],{},[81,82,86],"a",{"href":83,"rel":84},"https://www.archunit.org/",[85],"nofollow","ArchUnit"," for Java/Kotlin",[28,89,90,95],{},[81,91,94],{"href":92,"rel":93},"https://github.com/ts-arch/ts-arch",[85],"TSArch"," for TypeScript/JavaScript",[10,97,98],{},"These frameworks let us write architecture rules as unit tests, ensuring your structure stays clean as your team and test suite grow.",[14,100,102],{"id":101},"what-is-archunit-javakotlin","What Is ArchUnit? (Java/Kotlin)",[10,104,105],{},"ArchUnit is a Java testing library that allows you to define and enforce architecture rules directly in your codebase. It is typically used within JUnit test suites.",[10,107,108],{},"Classic backend example:",[10,110,111],{},[112,113,114],"code",{},"Controllers should not access repositories directly.",[10,116,117],{},"Sample implementation for a Spring Boot backend service (DDD):",[25,119,120],{},[28,121,122],{},[81,123,126],{"href":124,"rel":125},"https://github.com/senurafdo/quality-hub",[85],"quality-hub",[10,128,129],{},"But ArchUnit is just as powerful in UI automation.",[10,131,132],{},"For example:",[25,134,135,140],{},[28,136,137],{},[112,138,139],{},"Tests should not use WebDriver directly, only Page Objects should.",[28,141,142],{},[112,143,144],{},"Page Objects must not depend on test classes.",[10,146,147],{},"ArchUnit executes architectural rules as part of your test suite. If a rule is violated, the test fails, and when this suite runs in CI (for example, GitHub Actions), the PR can be blocked from merging.",[10,149,150],{},"This makes architecture enforcement non-negotiable and keeps your codebase structurally sound over time.",[14,152,154],{"id":153},"what-is-tsarch-typescriptjavascript","What Is TSArch? (TypeScript/JavaScript)",[10,156,157],{},"If you are working with Playwright, Cypress, or WebdriverIO, the equivalent tool is TSArch, a TypeScript architecture testing framework inspired by ArchUnit.",[14,159,161],{"id":160},"why-architecture-tests-matter","Why Architecture Tests Matter",[10,163,164],{},"Architecture tests bring discipline, consistency, and maintainability to automation projects.",[10,166,167],{},"The real power comes when DevEx or Platform teams embed these rules into their boilerplate automation templates. From that point on, every developer and QA must adhere to the established architecture, not because they remember the rules, but because the framework enforces them.",[14,169,171],{"id":170},"conclusion","Conclusion",[10,173,174],{},"Test automation frameworks are software, and software needs an architecture.",[10,176,177],{},"If your UI, backend, or API test suite is starting to feel fragile, inconsistent, or difficult to maintain, architecture tests may be the most impactful improvement you introduce this year.",{"title":179,"searchDepth":180,"depth":180,"links":181},"",2,[182,184,185,186,187,188],{"id":16,"depth":183,"text":17},3,{"id":71,"depth":183,"text":72},{"id":101,"depth":183,"text":102},{"id":153,"depth":183,"text":154},{"id":160,"depth":183,"text":161},{"id":170,"depth":183,"text":171},"https://medium.com/@senurafernando/architecture-tests-are-the-missing-layer-in-automation-79c7a9870fb0","2025-12-04","Why your automation tests deserve architecture tests, and how ArchUnit and TSArch can enforce structure at scale.","md",false,null,{},true,"/blog/architecture-tests-are-the-missing-layer-in-automation",{"title":5,"description":191},"blog/architecture-tests-are-the-missing-layer-in-automation",[201,202,203,204,205],"automation","architecture","testing","archunit","tsarch","dpJ1eKP9SM6e3PGl6yvuEj_1WS3zutnn1FljkRA8hrM",[194,208],{"title":209,"path":210,"stem":211,"children":-1},"Mac Mini M4 Pro for QA Automation - A Practical Evaluation","/blog/mac-mini-m4-pro-for-qa-automation-practical-evaluation","blog/mac-mini-m4-pro-for-qa-automation-practical-evaluation",1773399594200]