~/talk

Unit Test Your Java Architecture With ArchUnit

Talkat Voxxed Days Zurich 2023 · on Thursday, 2023-03-16· [java, testing]
slides:none on file

Uses ArchUnit plus JUnit 5 to turn architecture rules into executable unit tests against Java bytecode, demonstrated on Spring PetClinic: naming conventions, package/module dependency checks, layered-architecture enforcement and cycle detection all fail fast with precise messages and IntelliJ links. Shows jMolecules to declare layers in production code and uses a freeze file that records existing violations so legacy projects can incrementally clean up without breaking CI. Tests run once-per-analysis so subsequent checks are much faster.

AI-written summary · about

  1. 0:00ArchUnit and architecture challenges
  2. 5:29What is ArchUnit
  3. 9:10Setup with Spring demo
  4. 12:28Enforcing naming conventions
  5. 15:24Module dependencies and circular violations
  6. 20:48Layered architecture checks
  7. 24:01ArchUnit with JMolecules
  8. 28:02Legacy projects with freezing rules
  9. 33:57Automated architecture testing in CI
  10. 35:44Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.