#ArchUnit
🐧 **ArchUnit – test Java software architecture**

ArchUnit tests Java software architecture, checking package dependencies, layered design, cycles and coding conventions in test suites.

📰 Source: LinuxLinks
🔗 Link: https://www.linuxlinks.com/archunit-test-java-software-architecture/
ArchUnit – test Java software architecture
ArchUnit is a Java library for testing software architecture. It allows developers to express architectural constraints as automated tests, helping ensure that a codebase continues to follow its intended design as the application evolves. The library examines compiled Java classes and constructs a representation of their relationships. Developers can then define rules governing dependencies, package organisation and interactions between different parts of an application. ArchUnit is particularly valuable for large projects where architectural conventions can gradually deteriorate. A change that introduces an unwanted dependency or violates a layering rule can be detected during testing instead of remaining unnoticed until the codebase becomes difficult to maintain. Architectural tests are written in Java using a fluent API. This makes them suitable for inclusion alongside existing unit tests and allows teams to express rules in a form that is both executable and relatively easy to understand. This is free and open source software. #### Key Features * Analyses compiled Java bytecode to examine classes, packages, methods, fields and their dependencies. * Checks dependencies between packages and classes against predefined architectural constraints. * Enforces layered architectures by restricting interactions between application layers. * Supports onion architecture rules for separating domain logic, application services and adapters. * Detects cyclic dependencies between packages and architectural slices. * Verifies class naming conventions and package organisation rules. * Checks inheritance relationships, interface implementations and annotation requirements. * Provides a fluent Java API for creating readable architectural tests. * Supports custom conditions and predicates for application-specific architectural requirements. * Includes module-oriented rules for examining boundaries and dependencies between logical application modules. * Allows architecture rules to be grouped and reused across test classes. * Provides integration with JUnit 4, JUnit 5 and JUnit 6. * Supports caching imported classes to reduce repeated analysis during test execution. * FreezingArchRule records existing violations and reports newly introduced violations, allowing gradual improvement of legacy codebases. * Provides detailed violation reports identifying code that breaks architectural rules. **Website:** **github.com/TNG/ArchUnit** **Support:** **Developer:** TNG Technology Consulting GmbH **License:** Apache License 2.0 ArchUnit is written in Java. Learn Java with our recommended **free books** and **free tutorials**. * * * #### Related Software **Java Linter Tools** --- **SpotBugs**| Find bugs in Java code **PMD**| Extensible cross-language static code analyzer **Error Prone**| Catch common Java mistakes **NullAway**| Eliminate NPEs in Java code **Infer**| Static analysis tool for Java, C++, Objective-C, and C **Checkstyle**| Write Java code that adheres to a coding standard **Checker Framework**| Pluggable type-checking for Java **OpenRewrite**| Automates large-scale source code refactoring and migration **Find Security Bugs**| Detects security vulnerabilities in Java applications **Forbidden APIs**| Checks Java code for prohibited or unsafe API usage Read our verdict in the **software roundup**. * * * LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of **recommended applications** , including alternatives to popular proprietary software. We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our **Linux resources** to discover more. Know a useful free and open source Linux application we haven't covered? **Suggest a program** for inclusion. Has your software been featured on LinuxLinks? Display one of our **Featured on LinuxLinks badges** on your website or GitHub README. ---
www.linuxlinks.com
November 8, 2026 at 2:56 AM
🐧 **ArchUnit – test Java software architecture**

ArchUnit tests Java software architecture, checking package dependencies, layered design, cycles and coding conventions in test suites.

📰 Source: LinuxLinks
🔗 Link: https://www.linuxlinks.com/archunit-test-java-software-architecture/
ArchUnit – test Java software architecture
ArchUnit is a Java library for testing software architecture. It allows developers to express architectural constraints as automated tests, helping ensure that a codebase continues to follow its intended design as the application evolves. The library examines compiled Java classes and constructs a representation of their relationships. Developers can then define rules governing dependencies, package organisation and interactions between different parts of an application. ArchUnit is particularly valuable for large projects where architectural conventions can gradually deteriorate. A change that introduces an unwanted dependency or violates a layering rule can be detected during testing instead of remaining unnoticed until the codebase becomes difficult to maintain. Architectural tests are written in Java using a fluent API. This makes them suitable for inclusion alongside existing unit tests and allows teams to express rules in a form that is both executable and relatively easy to understand. This is free and open source software. #### Key Features * Analyses compiled Java bytecode to examine classes, packages, methods, fields and their dependencies. * Checks dependencies between packages and classes against predefined architectural constraints. * Enforces layered architectures by restricting interactions between application layers. * Supports onion architecture rules for separating domain logic, application services and adapters. * Detects cyclic dependencies between packages and architectural slices. * Verifies class naming conventions and package organisation rules. * Checks inheritance relationships, interface implementations and annotation requirements. * Provides a fluent Java API for creating readable architectural tests. * Supports custom conditions and predicates for application-specific architectural requirements. * Includes module-oriented rules for examining boundaries and dependencies between logical application modules. * Allows architecture rules to be grouped and reused across test classes. * Provides integration with JUnit 4, JUnit 5 and JUnit 6. * Supports caching imported classes to reduce repeated analysis during test execution. * FreezingArchRule records existing violations and reports newly introduced violations, allowing gradual improvement of legacy codebases. * Provides detailed violation reports identifying code that breaks architectural rules. **Website:** **github.com/TNG/ArchUnit** **Support:** **Developer:** TNG Technology Consulting GmbH **License:** Apache License 2.0 ArchUnit is written in Java. Learn Java with our recommended **free books** and **free tutorials**. * * * #### Related Software **Java Linter Tools** --- **SpotBugs**| Find bugs in Java code **PMD**| Extensible cross-language static code analyzer **Error Prone**| Catch common Java mistakes **NullAway**| Eliminate NPEs in Java code **Infer**| Static analysis tool for Java, C++, Objective-C, and C **Checkstyle**| Write Java code that adheres to a coding standard **Checker Framework**| Pluggable type-checking for Java **OpenRewrite**| Automates large-scale source code refactoring and migration **Find Security Bugs**| Detects security vulnerabilities in Java applications **Forbidden APIs**| Checks Java code for prohibited or unsafe API usage Read our verdict in the **software roundup**. * * * LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of **recommended applications** , including alternatives to popular proprietary software. We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our **Linux resources** to discover more. Know a useful free and open source Linux application we haven't covered? **Suggest a program** for inclusion. Has your software been featured on LinuxLinks? Display one of our **Featured on LinuxLinks badges** on your website or GitHub README. ---
www.linuxlinks.com
November 10, 2026 at 2:59 AM
Graph diffs help. What's also worked for me is architecture tests in CI (ArchUnit, dependency-cruiser): encode allowed layer and service dependencies, fail the build on new edges, and ask for a short design note when an AI change crosses a boundary.
October 21, 2026 at 12:57 PM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
October 20, 2026 at 5:00 AM
Current rule I'm implementing with archunit.

- Packages are limited in size to 20 classes, interfaces, and records (total). This includes inner classes but only applies to public and package-private objects.
- An interface may have a single default implementation in the same package and the two […]
Original post on hachyderm.io
hachyderm.io
October 9, 2026 at 6:42 PM
New IntelliJ IDEA Tech Talk episode!

Architecture as code. @rweisleder.de joins IntelliJ IDEA Tech Talks to turn architecture rules into ArchUnit tests, catch cycles before they catch you, and keep docs and code from drifting apart.

🔗 youtu.be/hEnSy8vlK10
October 7, 2026 at 3:08 PM
Final rehearsal complete! ✅ Tomorrow at Devoxx Belgium (18:20, Room 8), I'm exploring Testing Architecture Made Simple with ArchUnit and Taikai.

Can't wait to show you these tools in action! 🎯

m.devoxx.com/events/dvbe2...

@devoxx.com
Testing Architecture Made Simple - Devoxx Belgium 2026
By Gunter Rotsaert. The session shows how ArchUnit turns architectural decisions into automated tests, and how Taikai extends it with ready-made rules for popular technologies. Together, they help tea...
m.devoxx.com
October 4, 2026 at 9:33 AM
ArchUnit in the Age of Agentic Development
A blog by Rob

In our projects we have been using ArchUnit for years to write unit tests that...

#dev #softwaredevelopment #Java #AI #Architecture #ArchUnit #AgenticDevelopment

https://jdriven.com/blog/2026/10/ArchUnit-in-the-Age-of-Agentic-Development/
October 1, 2026 at 7:07 AM
Do you keep finding the same issues in AI-generated code, despite your AGENTS.md or skill files?

Me too, so I built Bylaws - it’s an architectural linting library for Swift, like ArchUnit or Konsist, that turns your rules into automated and deterministic checks.

github.com/theblixguy/s...
GitHub - theblixguy/swift-bylaws: Architectural linting for Swift developers and coding agents
Architectural linting for Swift developers and coding agents - theblixguy/swift-bylaws
github.com
September 26, 2026 at 12:18 AM
Oh yeah, I'm specifically talking about use cases where perfectly good tools exist: migrating code with OpenRewrite, verifying architecture with ArchUnit, using linters for code style, etc.
September 24, 2026 at 11:37 AM
Examples include:
* migrating code with AI vs using OpenRewrite
* asking agent to verify code against coding guidelines in a skill vs using linters, ArchUnit
* asking agent to run with coverage (IntelliJ IDEA can do that)
September 24, 2026 at 11:42 AM
techblog.zozo.com/entry/ve...
AIエージェント向けコーディングルールをArchUnitで機械的に検証する運用 - ZOZO TECH BLOG
AIエージェント向けコーディングルールをArchUnitで機械的に検証する運用 - ZOZO TECH BLOG
techblog.zozo.com
September 12, 2026 at 9:15 AM
【今日のテックニュース(2026-09-10)】
1. Apple、初の折りたたみ「iPhone Duo」および「iPhone 18 Pro」を発表
2. ZOZO、AIエージェント向けコーディングルールをArchUnitで機械的に検証
3. AWS、AgentCore MemoryのIngestData APIでAIに長期記憶を後付け
4. AutomatticのCEO Matt Mullenweg氏が休職へ
September 9, 2026 at 11:01 PM
#🔖テクノロジー
AIエージェント向けコーディングルールをArchUnitで機械的に検証する運用 - ZOZO TECH BLOG

はじめに こんにちは。商品基盤部の藤本です。 私たちのチームでは、生成AIコーディングエージェント(以下、AIエージェント。主にClaude Code)を使って開発に取り組んでいます。以前からAIエージェントに一貫した実装をしてもらうため、ルールを書いて指示する運用を続けてきました。しかし、ルール同士の矛盾やレビュ...
AIエージェント向けコーディングルールをArchUnitで機械的に検証する運用 - ZOZO TECH BLOG
techblog.zozo.com
September 9, 2026 at 7:25 PM
We wrote an ArchUnit rule to break the build when java.util.Date is used.
November 20, 2024 at 7:35 PM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
August 9, 2026 at 1:21 PM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
June 15, 2026 at 10:30 PM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
April 19, 2026 at 8:56 PM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
January 13, 2026 at 8:42 PM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
November 29, 2025 at 4:39 AM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
October 14, 2025 at 4:37 AM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
August 30, 2025 at 4:35 AM
You create a well-defined architecture, but how do you enforce this architecture in your code? With ArchUnit you can define rules for your architecture by means of unit tests.
#Java
Enforcing Architecture with ArchUnit in Java
The content discusses implementing architectural rules in code using ArchUnit, emphasizing its effectiveness over traditional documentation. It details the process of defining architecture checks w…
mydeveloperplanet.com
July 16, 2025 at 4:53 AM